Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Ads

Discussion Groups

Discussion Groups | Matlab DSP | How to generate random noise voltage?

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

How to generate random noise voltage? - khoo_nelson - Oct 3 10:33:20 2008



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.


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: How to generate random noise voltage? - pavel_qmed - Oct 4 22:23:36 2008

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.


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: How to generate random noise voltage? - ion....@gmail.com - Oct 4 22:24:07 2008


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.


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )