File: phasemag.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (38 lines) | stat: -rw-r--r-- 1,128 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
phasemag          Scilab Group          Scilab Function            phasemag
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