ell1mag - magnitude of elliptic filter
Function used for squared magnitude of an elliptic filter. Usually m1=eps*eps/(a*a-1). Returns v=real(ones(z)./(ones(z)+eps*eps*s.*s)) for s=%sn(z,m1).
deff('[alpha,beta]=alpha_beta(n,m,m1)',... 'if 2*int(n/2)=n then, beta=K1; else, beta=0;end;... alpha=%k(1-m1)/%k(1-m);') epsilon=0.1;A=10; //ripple parameters m1=(epsilon*epsilon)/(A*A-1);n=5;omegac=6; m=find_freq(epsilon,A,n);omegar = omegac/sqrt(m) %k(1-m1)*%k(m)/(%k(m1)*%k(1-m))-n //Check... [alpha,beta]=alpha_beta(n,m,m1) alpha*%asn(1,m)-n*%k(m1) //Check sample=0:0.01:20; //Now we map the positive real axis into the contour... z=alpha*%asn(sample/omegac,m)+beta*ones(sample); plot(sample,ell1mag(epsilon,m1,z))