求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/07/04 02:56:03
![求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](/uploads/image/z/3837642-42-2.jpg?t=%E6%B1%82MATLAB%E5%A4%A7%E7%A5%9E%E6%8C%87%E7%82%B9clear+all%3Bclose+all%3Bt%3D0%3A0.004%3A1%3Bf0%3D0.5%3Bf1%3D32%3By1%3Dchirp%280%2Cf0%2C1%2Cf1%29%3By2%3Dhilbert%28y1%29%3By%3Dy1%2Bj%2Ay2%3Bc%3Dfft%28y%29N%3D256%3Bnbands%3D8%3B%5Bhopt%2CH%2CG%5D%3Dopt_filter%28N%2Cnbands%29%3Bstem%28hopt%2C%26%2339%3Bk%26%2339%3B%29%3Bgrid%3B+++++h0%3DH%281%2C%3A%29%3B+++++h1%3DH%282%2C%3A%29%3B+++++h2%3DH%283%2C%3A%29%3B+++++h3%3DH%284)
求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不一样
你补充的问题什么意思啊?