求MATLAB大神指点clear all;close all;t=0:0.004:1;f0=0.5;f1=32;y1=chirp(0,f0,1,f1);y2=hilbert(y1);y=y1+j*y2;c=fft(y)N=256;nbands=8;[hopt,H,G]=opt_filter(N,nbands);stem(hopt,'k');grid; h0=H(1,:); h1=H(2,:); h2=H(3,:); h3=H(4
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 11:44:04
求MATLAB大神指点clear all;close all;t=0:0.004:1;f0=0.5;f1=32;y1=chirp(0,f0,1,f1);y2=hilbert(y1);y=y1+j*y2;c=fft(y)N=256;nbands=8;[hopt,H,G]=opt_filter(N,nbands);stem(hopt,'k');grid; h0=H(1,:); h1=H(2,:); h2=H(3,:); h3=H(4
求MATLAB大神指点
clear all;
close all;
t=0:0.004:1;
f0=0.5;
f1=32;
y1=chirp(0,f0,1,f1);
y2=hilbert(y1);
y=y1+j*y2;
c=fft(y)
N=256;
nbands=8;
[hopt,H,G]=opt_filter(N,nbands);
stem(hopt,'k');grid;
h0=H(1,:);
h1=H(2,:);
h2=H(3,:);
h3=H(4,:);
h4=H(5,:);
h5=H(6,:);
h6=H(7,:);
h7=H(8,:);
stem(h0,'k.');grid;
[H0,w]=freqz(h0,1,512,1);
[H1,w]=freqz(h1,1,512,1);
[H2,w]=freqz(h2,1,512,1);
[H3,w]=freqz(h3,1,512,1);
[H4,w]=freqz(h4,1,512,1);
[H5,w]=freqz(h5,1,512,1);
[H6,w]=freqz(h6,1,512,1);
[H7,w]=freqz(h7,1,512,1);
for i=0:nbands-1;
z=c.*H(i);
end
plot(w,z)
这是程序
for k=1:nbands
for l=1:flen
m1=cos(pi*(2*k-1)*(2*l-1)/(4*nbands));
m2=sin(pi*(2*k-1)*(2*l-1)/(4*nbands));
H(k,l)=2.0*(real(a(k))*m1-imag(a(k))*m2)*hopt(l);
end
for l=1:flen
m1=cos(pi*(2*k-1)*(2*l-1)/(4*nbands));
m2=sin(pi*(2*k-1)*(2*l-1)/(4*nbands));
G(k,l)=2.0*(real(a(k))*m1+imag(a(k))*m2)*hopt(l);
end
end
求MATLAB大神指点clear all;close all;t=0:0.004:1;f0=0.5;f1=32;y1=chirp(0,f0,1,f1);y2=hilbert(y1);y=y1+j*y2;c=fft(y)N=256;nbands=8;[hopt,H,G]=opt_filter(N,nbands);stem(hopt,'k');grid; h0=H(1,:); h1=H(2,:); h2=H(3,:); h3=H(4
for i=1:nbands;
z=c.*H(i);
end
MATLAB 不能从0开始,和C不一样
你补充的问题什么意思啊?