|
![](/i/fill.gif) |
Hi.
I am trying to create a random phase within a sine function, but keep getting an
error that a 'function identifier' is expected and I do not understand why.
I am doing:
#declare R1=seed(1153);
#declare xspectrum =function{ sin ( x+ rand(R1) ) }
but it does not work. I do realize that for this case I could use:
#declare randomnum=rand(R1);
first and use that in my sine function, because this works, but I really need to
have the random number computed within the sine function. This is just a
simplified case, what I will really do is:
#declare xspectrum = function { sum(Kx,1,10, .025/2*( sin(Kx*6.2832*x +
2*3.14159*rand(R1) ) ) ) }
and here I definitely need the random number evaluated in the function.
Any ideas,
Mike
Post a reply to this message
|
![](/i/fill.gif) |