Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語 -
Справка Scilab >> Polynomials > factors


factorization in ℝ of a polynomial or a rational fraction


[lnum, gain] = factors(pol)
[lnum, gain] = factors(pol, flag)
[lnum, lden, gain] = factors(rat)
[lnum, lden, gain] = factors(rat, flag)
rat = factors(rat, flag)


real polynomial.

real rational (rat=pol1/pol2).

lnum, lden
lists of polynomials (of degrees 1 or 2).

real number.

character string: 'c', or 'd'.


returns the factors of polynomial pol in the list lnum, and the "gain".

One has pol = gain times product of entries of the list lnum (if flag is not given). If flag='c' is given, then one has |pol(i omega)| = |gain*prod(lnum_j(i omega)|. If flag='d' is given, then one has |pol(exp(i omega))| = |gain*prod(lnum_i(exp(i omega))|. If argument of factors is a 1x1 rational rat=pol1/pol2, the factors of the numerator pol1 and the denominator pol2 are returned in the lists lnum and lden respectively.

The "gain" is returned as gain,i.e. one has: rat= gain times (product entries in lnum) / (product entries in lden).

If flag is 'c' (resp. 'd'), the roots of pol are reflected wrt the imaginary axis (resp. the unit circle), i.e. the factors in lnum are stable polynomials.

Same thing if factors is invoked with a rational arguments: the entries in lnum and lden are stable polynomials if flag is given. R2=factors(R1,'c') or R2=factors(R1,'d') with R1 a rational function or SISO syslin list then the output R2 is a transfer with stable numerator and denominator and with same magnitude as R1 along the imaginary axis ('c') or unit circle ('d').


n = poly([0.2,2,5],'z');
d = poly([0.1,0.3,7],'z');
R = syslin('d',n,d);
R1 = factors(R,'d')
w = exp(2*%i*%pi*[0:0.1:1]);
norm(abs(horner(R1,w)) - abs(horner(R,w)))

See also

  • polfact — minimal real factors of a polynomial
  • roots — roots of a polynomial
  • pfss — partial fraction decomposition
  • simp — rational simplification
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:39:55 CET 2022