Filter cascade with raised cosine filter and half-band filter
Ältere Kommentare anzeigen
I've created a raised cosine filter and a half-band filter, respectively, and want to cascade them. However, I got "Numeric stages of size [1 11] are not supported. All numeric stages must be scalars."
Fs = 20e3;
Fp = 15e3;
rc = rcosdesign(0.35, 5, 2, 'sqrt');
Fs2 = 4*Fs; % Sample rate
Fp2 = Fp; % Passband edge
Fh2 = Fs2/4; % Halfband frequency
TW2 = (Fh2-Fp2)/Fh2;
N2 = 48;
hb2 = designHalfbandFIR(FilterOrder=N2,...
TransitionWidth=TW2,...
Passband='lowpass',...
DesignMethod='kaiser',...
Structure='interp',...
SystemObject=true);
Fc = cascade(rc, hb2);
I also created the raised cosine filter with comm.RaisedCosineTransmitFilter to see if this works. However, MATLAB returned another error, "Cascades must be made of discrete-time filter (DFILT) objects.".
Fs = 20e3;
Fp = 15e3;
rc = comm.RaisedCosineTransmitFilter;
Fs2 = 4*Fs; % Sample rate
Fp2 = Fp; % Passband edge
Fh2 = Fs2/4; % Halfband frequency
TW2 = (Fh2-Fp2)/Fh2;
N2 = 48;
hb2 = designHalfbandFIR(FilterOrder=N2,...
TransitionWidth=TW2,...
Passband='lowpass',...
DesignMethod='kaiser',...
Structure='interp',...
SystemObject=true);
Fc = cascade(rc, hb2);
Why two codes show different errors and what am I supposed to cascade two filters?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Filter Analysis finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!