Butterworth Filter on Matlab

Thread Starter

tquiva

Joined Oct 19, 2010
176
I'm currently having issues with my Matlab code for the following problem:

1) The numeric Matlab command, [n,d]=butter(k,w0,'s'), will generate a vector of numerator coefficients, n, and the vector of denominator coefficients, d of a filter. The parameter k is a positive integer, usually less than 10; the parameter w0 is positive.

(a) Use the command pzmap(n,d) to investigate the poles and zeroes of such a filter. Clearly discuss the effect of the parameters k and w0 on the poles and zeroes of the filter. Develop figures that clearly illustrate the behavior of the poles and zeroes of such a filter.

My code is:

Rich (BB code):
syms k w0;
% k is a positive integer, less than 10 
k=0:0.1:9;
% w0 is positive 
w0=0:0.1:inf;
[n,d]=butter(k,w0,'s')
When I run this, I get the error:

??? Maximum variable size allowed by the program is exceeded.

So I tried changing inf to a number such as 0.1, but I get another error:

??? Error using ==> butter at 41
The cutoff frequencies must be greater than zero.

What am I doing wrong here?
Could please help me?

My many thanks in advance
 
Look into the colon notation again. If you replace inf with 0.1, you get a range from 0 to .1 with a step size of .1. In other words, you are probably getting a vector with one element which is zero. You probably want a large number instead of inf (i.e. infinity...)
 
Top