[Matlab]从低通滤波器变换成带通滤波器

%从低通滤波器变换成带通滤波器

close all
clear
Fpass = 0.1;  % Passband Frequency
Fstop = 0.2;  % Stopband Frequency
Apass = 1;     % Passband Ripple (dB)
Astop = 60;    % Stopband Attenuation (dB)

h = fdesign.lowpass('fp,fst,ap,ast', Fpass, Fstop, Apass, Astop);

Hd = design(h, 'equiripple', ...
    'MinOrder', 'any', ...
    'StopbandShape', 'flat');
Hlp = Hd.Numerator;
fvtool(Hlp);

theta=pi*0.2;
theta=exp(1i*theta);
theta=theta.^(0:length(Hlp)-1);
Hlp25=Hlp.*theta;
fvtool(Hlp25);

fs=200;
t=0:1/fs:100;
s25=cos(2*pi*25*t);
s25Hlp=conv(s25,Hlp);
s25Hlp25=conv(s25,Hlp25);

plot(s25Hlp);
figure;
plot(real(s25Hlp25));
hold on;
plot(imag(s25Hlp25),'r');

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 酷酷鲨 设计师:CSDN官方博客 返回首页