Question

I would like to create or generate white noise in the range of [-1 1], but I don't know exactly how to do it. My programming language of choice is matlab. As far as I know there exists a function named randn and also a function named wgn (white gaussian noise). So please help me with this issue, to clarify, for example I want to generate following equation:

x(t)=20*sin(2*pi*f1*t)+30*cos(2*pi*f2*t)+A3*white noise

where A3=amplitude and white noise is in the range [-1 1]. Please help me and clarify how to do it. My confusion is related to white noise, not about the others, let's assume that t is changing from 1 to 100.

Was it helpful?

Solution

white noise is a random signal with a flat (constant) power spectral density. for that you can use rand. In order to obtain white noise in the interval [-1 1] you can just add to your expression white_noise=(rand(1,t)*2-1) .

OTHER TIPS

I am not quite sure, but as natan says, you should be able to generate white noise from a uniform distribution of random samples.

I would proceed as follows:

wn = unifrnd(-seed,seed,[m,n])/seed;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top