91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 8KB
    文件類型: .zip
    金幣: 2
    下載: 1 次
    發布日期: 2021-06-25
  • 語言: 其他
  • 標簽: matlab??

資源簡介

卡爾曼濾波器,自適應濾波器設計,線性預測濾波器,Lattice濾波器。全部設計程序

資源截圖

代碼片段和文件信息

L=input(‘請輸入信號長度L=‘);
N=input(‘請輸入濾波器階數N=‘);
%產生w(n)v(n)u(n)s(n)和x(n)
a=0.95;
b1=sqrt(12*(1-a^2))/2;
b2=sqrt(3);
w=random(‘uniform‘-b1b11L); %利用random函數產生均勻白噪聲
v=random(‘uniform‘-b2b21L);
u=zeros(1L);
for?i=1:L
??u(i)=1;
end
s=zeros(1L);?
s(1)=w(1);
for?i=2:L
??s(i)=a*s(i-1)+w(i);
end
??x=zeros(1L);
??x=s+v;
%繪出s(n)和x(n)的曲線圖
set(gcf‘Color‘[111]);
i=L-100:L;
subplot(221);
plot(is(i)ix(i)‘r:‘);
title(‘s(n)?&?x(n)‘);
legend(‘s(n)‘?‘x(n)‘);
%計算理想濾波器的h(n)
h1=zeros(N:1);
for?i=1:N
?????h1(i)=0.238*0.724^(i-1)*u(i);
end
%利用公式,計算Rxx和rxs
Rxx=zeros(NN);
rxs=zeros(N1);
for?i=1:N
?????for?j=1:N
?????????m=abs(i-j);
?????????tmp=0;
?????????for?k=1:(L-m)
?????????????tmp=tmp+x(k)*x(k+m);
?????????end
?????????Rxx(ij)=tmp/(L-m);
?????end
end
for?m=0:N-1
?????tmp=0;
?????for?i=1:?L-m
?????????tmp=tmp+x(i)*s(m+i);
?????end
?????rxs(m+1)=tmp/(L-m);
?end
%產生FIR維納濾波器的h(n)
h2=zeros(N1);
h2=Rxx^(-1)*rxs;
%繪出理想和維納濾波器h(n)的曲線圖
i=1:N;
subplot(222);
plot(ih1(i)ih2(i)‘r:‘);
title(‘h(n)?&?h~(n)‘);
legend(‘h(n)?‘‘h~(n)‘);
%計算Si
Si=zeros(1L);
Si(1)=x(1);
for?i=2:L
Si(i)=0.724*Si(i-1)+0.238*x(i);
end
%繪出Si(n)和s(n)曲線圖
?i=L-100:L;
?subplot(223);
?plot(is(i)iSi(i)‘r:‘);
title(‘Si(n)?&?s(n)‘);
legend(‘Si(n)?‘‘s(n)‘);
%計算Sr
Sr=zeros(1L);
for?i=1:L
?????tmp=0;
?????for?j=1:N-1
?????????if(i-j<=0)
?????????????tmp=tmp;
?????????else?
?????????????tmp=tmp+h2(j)*x(i-j);
?????????end
?????end
?????Sr(i)=tmp;
?end
%繪出Si(n)和s(n)曲線圖
i=L-100:L;
subplot(224);
plot(is(i)iSr(i)‘r:‘);
title(‘s(n)?&?Sr(n)‘);
legend(‘s(n)?‘‘Sr(n)‘);
%計算均方誤差ExEi和Er
tmp=0;
?for?i=1:L
?????tmp=tmp+(x(i)-s(i))^2;
end
Ex=tmp/L %打印出Ex
tmp=0;
for?i=1:L
?????tmp=tmp+(Si(i)-s(i))^2;
end
Ei=tmp/L
tmp=0;
for?i=1:L
??????tmp=tmp+(Sr(i)-s(i))^2;
end
Er=tmp/L

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-09-11?11:01??chapter06\
?????文件????????1985??2014-08-02?13:15??chapter06\ex6-1.m
?????文件?????????675??2014-08-02?13:26??chapter06\ex6-10.m
?????文件????????1435??2014-08-02?13:27??chapter06\ex6-11.m
?????文件????????2680??2014-08-02?13:27??chapter06\ex6-12.m
?????文件????????1103??2014-08-02?13:23??chapter06\ex6-2.m
?????文件?????????410??2014-08-02?13:23??chapter06\ex6-3.m
?????文件?????????850??2014-08-02?13:24??chapter06\ex6-4.m
?????文件?????????427??2014-08-02?13:24??chapter06\ex6-5.m
?????文件??????????68??2014-08-02?13:25??chapter06\ex6-6.m
?????文件?????????567??2014-08-02?13:25??chapter06\ex6-7.m
?????文件????????1277??2014-08-02?13:25??chapter06\ex6-8.m
?????文件?????????673??2014-08-02?13:26??chapter06\ex6-9.m

評論

共有 條評論