标题:[求助]关于信号中加噪声的的问题
只看楼主
dmxl1984
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2007-5-12
 问题点数:0 回复次数:0 
[求助]关于信号中加噪声的的问题
我想问下怎样在yy(tt1)=10*sin(0.8*pi*tt/4)这个函数中加一个信噪比为65的高斯白噪声??
function yy=yt(tt)
tt1=1;
for tt=tt-511:+1:tt
yy(tt1)=10*sin(0.8*pi*tt/4);
tt1=tt1+1;
end
clear;
u=input('输入数值u:')
%u=1/(256*50)/1;
nn=10000;
r=0;

%for i=1:2
for t=1:512
a(t)=0;
p(t)=0;
%p(t)=0.99*p(t-1)+0.01*(10*sin(0.8*pi*t/4))^2;
%e(t)=5*sin(0.8*pi*t/4+pi/30)-r;
%y(t)=10*sin(0.8*pi*t/4);
%a(t)=a(t-1)+u*e(t)*y(t);%./p(t);
%H(t)=a(t)*10*sin(0.8*pi*(513-t)/4);
%H(t)=a(t)*10*sin(0.8*pi*(t)/4);
end
for t=512:nn
p(t)=0.99*p(t-1)+0.01*(10*sin(0.8*pi*t/4))^2;
y=yt(t);
yu=a*y';
e(t)=5*sin(0.8*pi*t/4)-a*y';%+pi/30
%e=-a*y'
a=a+u*e(t)*y/p(t);
end
%r=sum(H);
%for t=512:nn
%p(t)=0.99*p(t-1)+0.01*(10*sin(0.8*pi*t/4))^2;
% e(t)=5*sin(0.8*pi*t/4+pi/30)-r;
% y(t)=10*sin(0.8*pi*t/4);
% a(t)=a(t-1)+u*e(t)*y(t);%./p(t);
% rr=0;
% for t1=0:511
%rr=rr+H(t-513+t1-1)=a(t-513+t1-1)*10*sin(0.8*pi*(t-t1+2)/4);
% rr=rr+a(t-t1)*10*sin(0.8*pi*(t-t1)/4);
%rr=rr+a(t-513+t1)*10*sin(0.8*pi*(t-513+t1)/4);
% end
%r=sum(H);
% r=rr;
% end
%end
%for t=2:512
%e(t)=5*sin(800*(t+pi/3))-r;
%end
%x=1:10000;
plot(e)
搜索更多相关主题的帖子: 噪声 信号 
2007-06-07 17:24



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-145716-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.253219 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved