File: phasemag.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 (42 lines) | stat: -rw-r--r-- 1,080 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
40
41
42

phasemag(1)                    Scilab Function                    phasemag(1)
NAME
  phasemag - phase and magnitude computation

CALLING SEQUENCE
  [phi,db]=phasemag(z [,mod])

PARAMETERS

  z    : matrix or row vector of complex numbers.

  mod  : character string

       mod='c'   : "continuous" representation between -infinity and +360
                 degrees (default)

       mod='m'   : representation between -360 and 0 degrees

  phi  : phases (in degree) of z.

  db   : magnitude (in Db)

DESCRIPTION
  phasemag computes the phases and magnitudes of the entries of a complex
  matrix. For mod='c' phasemag computes  phi(:,i+1)  to minimize the distance
  with  phi(:,i), i.e. it tries to obtain a "continuous representation" of
  the phase.

  To obtain the phase between -%pi and %pi use phi=atan(imag(z),real(z))

EXAMPLE
  s=poly(0,'s');
  h=syslin('c',1/((s+5)*(s+10)*(100+6*s+s*s)*(s+.3)));
  [frq,rf]=repfreq(h,0.1,20,0.005);
  xbasc(0);
  plot2d(frq',phasemag(rf,'c')');
  xbasc(1);
  plot2d(frq',phasemag(rf,'m')');

SEE ALSO
  repfreq, gainplot, atan, bode