Error While Using the butter() function for IIR Butterworth filter design
Mostrar comentarios más antiguos
I am using Matlab 2012a. My code for the design of IIR Butterworth filter is:
clc
clear all
Fs=1000;
fc=300;
WC=2*pi*fc;
N=5;
[b,a]=butter(N,WC,'s');
[z,p,k]=butter(N,WC,'s');
[bz,az]=ipminvar(b,a,Fs);
[h, f]=freqz(bz,az,512,Fs);
plot(f, 20*log10(asb(h))),grid;
xlabel('frequency(Hz)');
ylabel('Magnitude(dB)');
The error encountered after execution of the program is:
??? Attempt to execute SCRIPT butter as a function: E:\Academics\6th Sem\DSP Lab\Exp-8\butter.m
Error in ==> butter at 8 [b,a]=butter(N,WC,'s');
Signal Processing Toolbox is already present in my Matlab. I have checked it using
>>ver
Please help me to debug the problem.
Respuesta aceptada
Más respuestas (1)
Honglei Chen
el 4 de Abr. de 2012
0 votos
This error
??? Attempt to execute SCRIPT butter as a function: E:\Academics\6th Sem\DSP Lab\Exp-8\butter.m
indicates that you have a butter.m on your path that shadowed MATLAB's butter() function. You need to either remove it from the path or change its name to something other than butter.
1 comentario
Arnab Ray
el 4 de Abr. de 2012
Categorías
Más información sobre Butterworth en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!