Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.0 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Control Systems - CACSD > Linear Analysis > Frequency Domain > phasemag

phasemag

phase and magnitude computation

Syntax

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

Arguments

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

Examples

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);
scf();
plot2d(frq',phasemag(rf,'c')');
scf();
plot2d(frq',phasemag(rf,'m')');

See also

  • repfreq — frequency response
  • gainplot — magnitude plot
  • atan — 2-quadrant and 4-quadrant inverse tangent
  • bode — Bode plot
Report an issue
<< nyquistfrequencybounds Frequency Domain phaseplot >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:02:45 CET 2017