Hi,
One way is to use a power series where the coefficients are solved for whatever points you want to include in your message. This leads to some wild signals too that might be nice to have for something like this.
For the AM for example we would be solving for the amplitude. The idea would go like this...
First decide what points you might want in your message signal.
Using those points, construct the equations (here we do a third order series):
y=A3*x^3+A2*x^2+A1*x+A0
where each x takes on the value of time for that given value of y where y is your message signal point.
This will generate four equations in the four unknowns, which when solved gives you an equation that follows those chosen points although it can vary wildly in between those points (this may be good or bad so check your signal first).
Alternately you can use a regression technique for fitting the curve to a power series. To get an idea how this works you can look up second order regression. There are regression techniques for higher order equations which would give you quite a bit of control over what the message signal would look like within a limited time frame.
You might also want to specify whether or not conditionals are allowed in the message signal expression. If conditionals are allowed then we can use statements like:
if 5<=x<10 then y=x^2-1
This leads to message signals with jump discontinuities which may or may not be desired.