matlab 产生白噪声

如题所述

这样:

randn函数产生高斯分布序列,例如:

y=randn(1,2500); 

y=y/std(y); 

y=y-mean(y); 

a=0.0128; 

b=sqrt(0.9596); 

y=a+b*y;

y=rand(1,100);均与分布

R=exprnd(MU,m,n) 生成m×n形式的指数分布的随机数矩阵。

RAYLCDF Rayleigh cumulative distribution function.

P = RAYLCDF(X,B) returns the Rayleigh cumulative distribution

function with parameter B at the values in X.

The size of P is the common size of X and B. A scalar input

functions as a constant matrix of the same size as the other input.

扩展资料:

注意事项

在matlab中无论是wgn还是awgn函数,实质都是由randn函数产生的噪声。即,wgn函数中调用了randn函数,而awgn函数中调用了wgn函数。

根据awgn的实现代码可以知道“向已知信号添加某个信噪比(SNR)的高斯白噪声”,即:awgn(x,snr,’measured’,'linear’),命令的作用是对原信号x添加信噪比(比值)为SNR的噪声,在添加之前先估计信号x的强度。

直接对原始信号添加噪声:

y=x+rand(length(x),1)

y=x+randn(length(x),1))

温馨提示:答案为网友推荐,仅供参考