rand matlab添加噪声,matlab加入噪声(Matlab add noise).doc

matlab加入噪声(Matlab add noise)

matlab加入噪声(Matlab add noise)

(2) generate random Numbers that specify variance and mean

So let's say I have a random variable, x ~ N (Mx, Dx), if I want to generate the same distribution of random variables y ~ N (My, Dy), but make it new

The parameters of the machine vary with the x distribution

* (x = y Dy/Dx - Mx) + My

In order to generate a random number matrix of M * N distributed by N (u, o), it can be used

Y = o * randn (M, N) + u

For uniform distribution, the random number matrix of M * N with a uniform distribution of the [a, b] interval can be used

Y = rand (M, N) * (b - a) + a

(3) add noise directly to the original signal

Y = x + rand (length (x), 1) / / uniform distribution

Y is equal to x plus randn (length (x), 1))/plus the distribution

Take the awgn function in matlab as an example:

In matlab, whether it is WGN or awgn function, the essence is the noise generated by the randn function. That is, the randn function is called in the WGN function, and the WGN function is called in the awgn function.

According to awgn's implementation code, you can "add a SNR of SNR to a known signal",

The function of the command is to add the signal-to-noise ratio (ratio) of the original signal x to the noise of SNR, and estimate the intensity of the signal x before adding.

Here are three questions: how is SNR calculated in the awgn function? What is the intensity of the signal? How does the awgn function add noise?

In fact, the first two questions are related, because by definition, SNR is the intensity of the signal divided by the intensity of the noise, so first of all, the intensity of the signal. In fact, the intensity of the signal refers to the energy of the signal, in the continuous case is the integral after x squared, and in the discrete case nature is the sum over the integral. In matlab, the same is true, but a more standardized step:

SigPower = sum (abs (sig (:)) ^ 2)/length (sig (:))

That's the intensity of the signal. At this point, the SNR of the specific

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值