Please define this a little better. Do you want an analog simulation or a digital? Batch processing or sample by sample? Baseband or with a carrier?
The equation should come out of your textbook. The difficulty comes in when you want to filter between your data stream and the modulation.
jsolar