Technical discussion about Matlab and issues related to Digital Signal Processing.
Hello, I'm quite new in using Matlab.How to generate a 2000-point random noise voltage with a dc or mean value of 0 and an rms value of 10 V using a time step of 1 us. I try like this N=2000; for n=1:N x(n)=10*rand(); end I don't know correct or not. Please help me!Thank you! ______________________________ New Year Gift for Members of DSPRelated.com. Details here.
Hi, You can create the random function in the following way: x(n)=(rand(1,2000)*10)+(0); The general expression is: x=(rand(1,N)*(x2-x1))+(x1); if u want to vary the value between x2 and x1. For ur work -- x2=10, x1=0. It may work for you. Regards, Pavel --- In m...@yahoogroups.com, "khoo_nelson" <khoo_nelson@...> wrote: > > Hello, I'm quite new in using Matlab.How to generate a 2000-point > random noise voltage with a dc or mean value of 0 and an rms value of > 10 V using a time step of 1 us. > I try like this > > N=2000; > for n=1:N > x(n)=10*rand(); > end > > I don't know correct or not. Please help me!Thank you! > ______________________________ New Year Gift for Members of DSPRelated.com. Details here.
Hello, I'm quite new in using Matlab.How to generate a 2000-point >random noise voltage with a dc or mean value of 0 and an rms value of >10 V using a time step of 1 us. >I try like this > >N=2000; >for n=1:N >x(n)=10*rand(); >end > >I don't know correct or not. Please help me!Thank you! > If I am correct, I think you can do it as follows. N=2000; x=10*randn(1,N); Be careful, is not rand(), because this gives us a uniformly distributed values, and you want gaussian noise. That's why you need randn(). Ion ______________________________ New Year Gift for Members of DSPRelated.com. Details here.