i have problem with the last line in this matlab program
so is there is something wrong in the sentence
so is there is something wrong in the sentence
Rich (BB code):
clear all;
close all;
clc;
n=input('Enter the order of the butterworth filter:')
[z,p,k]=buttap(n);
[num,den]=zp2tf(z,p,k)
printsys(num,den,'s')
[num2,den2]=lp2lp(num,den,62986)
[H,w]=freqs(num2,den2)
magH=abs(H)
figure(1)
plot(w,magH,'linewidth',3)
figure(2)
magHdb=20*log10(magH)
plot(w,magHdb,'linewidth',3)
%[w,magH]=ginput(2)
cuttoff=min(w(find(magH)<=max((magH/(sqrt(2))))))
Attachments
-
400 bytes Views: 14
Last edited by a moderator: