how can i remove this error in my program?
1 view (last 30 days)
Show older comments
% frequency response of a tree structured QMF Filters clf; %Type in the low pass filter coefficients B1=input('Filter coefficients='); B1=[ B1 fliplr(B1)]; %Generate the complementary high pass filter L=length(B1); for k=1:L; B2(k) = ((-1)^k) * B1(k); end %Determine the coefficients of the four filters B10=zeros(1, 2*length(B1)); B10([1 : 2: length(B10)])= B1; B11=zeroes(1, 2*length(abs(B2))); B11([1: 2: length(B11)]) = B2; C0=conv(B1,B10); C1=conv(B1,B11); C2=conv(B2,B10); C3=conv(B2,B11); % determine the frequency responses [H0z,w] = Freqz(C0,1,256); h0= abs(H0z); M0=20*Log10(h0); [H1z,w] = Freqz(C1,1,256); h1= abs(H1z); M1=20*Log10(h1); [H2z,w]=freqz(C2,1,256); h2= abs(H2z); M2=20*Log10(h2); [H3z,w] = Freqz(C0,1,256); h3= abs(H3z); M3=20*Log10(h3); plot(w/pi,M0,'-',w/pi,M1,'--', w/pi,M2,'--',w/pi,M3,'-'); grid xlabel('\omega/\pi'); ylabel('gain, dB')
1 Comment
DuckDuck
on 12 Dec 2014
First of all you have to submit the code in the right form. There is a
Code
tag in the editor.
Accepted Answer
Star Strider
on 12 Dec 2014
It’s not necessary to run your code (I didn’t) to see the problem. MATLAB is case-sensitive, so convert ‘Freqz’ to ‘freqz’, ‘Log10’ to ‘log10’ and it should at least run.
0 Comments
More Answers (0)
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!