| Scilab Reference Manual |
|---|
phasemag — phase and magnitude computation
[phi,db]=phasemag(z [,mod])
| z | : matrix or row vector of complex numbers. | ||||
| mod | : character string
| ||||
| phi | : phases (in degree) of z. | ||||
| db | : magnitude (in Db) |
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))
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')');
| << pfss | p_margin >> |