File: ell1mag.cat

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (39 lines) | stat: -rw-r--r-- 1,085 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

ell1mag(1)                     Scilab Function                     ell1mag(1)
NAME
  ell1mag - magnitude of elliptic filter

CALLING SEQUENCE
  [v]=ell1mag(eps,m1,z)

PARAMETERS

  eps       : passband ripple=1/(1+eps^2)

  m1        : stopband ripple=1/(1+(eps^2)/m1)

  z         : sample vector of values in the complex plane

  v         : elliptic filter values at sample points

DESCRIPTION
  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).

EXAMPLE
  deff('[alpha,beta]=alpha_beta(n,m,m1)',...
  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))

SEE ALSO
  buttmag