I want to generate random numbers having sinusoidal distribution (as RANDN generates random numbers having Gaussian distribution). How can i do that. Please help me..........
Please define what you mean by a sinusoidal distribution.
Do you mean that the density function has a sinusoidal
shape? Clearly this is impossible, since that would have
infinite mass underneath it, plus a sine wave goes less
than zero.
Do you want numbers over the bounded interval [-1,1]?
This is trivial.
x = sin((rand(N) - 0.5)*pi);
So what is your intent here?
John