(word完整版)高斯白噪声的matlab实现

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

通信系统建模与仿真

实验一、高斯白噪声的matlab 实现

要求:

样本点:100 1000

标准差:0.2 2 10

均值: 0 0.2

白噪声

如果噪声的功率谱密度在所有的频率上均为一常数,即

)

/(),(,)(0Hz W f n f P n +∞<<-∞=

式中:0n 为常数,责成该噪声为白噪声,用)(t n 表示。

高斯白噪声的matlab实现

1.样本点为1000、均值为0、标准差为0.2时,高斯白噪声分布为下图所示:

程序如下所示:

% White background nois

clear all

f = 1:1:1000;

for i = 1:length(f)

K = (0.2) * randn(1,1) - 0;

P(i) = 10.^(K - 3.95*(10^-5)*f(i));

A(i) = sqrt(2*P(i));

end

xifft = ifft(A);

realx = real(xifft);

ti = [1:length(xifft)-1]/1000;

realx2(1:length(xifft)-1) = realx(2:length(xifft));

plot(ti,realx2)

程序如下所示:

% White background nois

clear all

f = 1:1:1000;

for i = 1:length(f)

K = (2) * randn(1,1) - 0;

P(i) = 10.^(K - 3.95*(10^-5)*f(i));

A(i) = sqrt(2*P(i)); end

xifft = ifft(A);

realx = real(xifft);

ti = [1:length(xifft)-1]/1000;

realx2(1:length(xifft)-1) = realx(2:length(xifft)); plot(ti,realx2)

程序如下所示:

% White background nois

clear all

f = 1:1:1000;

for i = 1:length(f)

K = (10) * randn(1,1) - 0;

P(i) = 10.^(K - 3.95*(10^-5)*f(i));

A(i) = sqrt(2*P(i)); end

xifft = ifft(A);

realx = real(xifft);

ti = [1:length(xifft)-1]/1000;

realx2(1:length(xifft)-1) = realx(2:length(xifft)); plot(ti,realx2)

程序如下所示:

% White background nois

clear all

f = 1:1:1000;

for i = 1:length(f)

K = (0.2) * randn(1,1) - 10;

P(i) = 10.^(K - 3.95*(10^-5)*f(i));

A(i) = sqrt(2*P(i)); end

xifft = ifft(A);

realx = real(xifft);

ti = [1:length(xifft)-1]/1000;

realx2(1:length(xifft)-1) = realx(2:length(xifft)); plot(ti,realx2)

程序如下所示:

% White background nois

clear all

f = 1:1:1000;

for i = 1:length(f)

K = (2) * randn(1,1) - 10;

P(i) = 10.^(K - 3.95*(10^-5)*f(i));

A(i) = sqrt(2*P(i)); end

xifft = ifft(A);

realx = real(xifft);

ti = [1:length(xifft)-1]/1000;

realx2(1:length(xifft)-1) = realx(2:length(xifft)); plot(ti,realx2)

程序如下所示:

% White background nois

clear all

f = 1:1:1000;

for i = 1:length(f)

K = (10) * randn(1,1) - 10;

P(i) = 10.^(K - 3.95*(10^-5)*f(i));

A(i) = sqrt(2*P(i)); end

xifft = ifft(A);

realx = real(xifft);

ti = [1:length(xifft)-1]/1000;

realx2(1:length(xifft)-1) = realx(2:length(xifft)); plot(ti,realx2)

程序如下所示:

% White background nois

clear all

f = 1:1:100;

for i = 1:length(f)

K = (0.2) * randn(1,1) - 0;

P(i) = 10.^(K - 3.95*(10^-5)*f(i));

A(i) = sqrt(2*P(i)); end

xifft = ifft(A);

realx = real(xifft);

ti = [1:length(xifft)-1]/1000;

realx2(1:length(xifft)-1) = realx(2:length(xifft)); plot(ti,realx2)

相关文档
最新文档