Biomodèles/Biomodels
SCILAB 3.0 PAS A PAS
SCILAB 3.0 STEP-TO-STEP

Jacques-Deric Rouault

Laboratoire de Neurobiologie de l'Apprentissage, de la Mémoire et de la Communication. CNRS UMR 8620, Bat. 446, Université Paris-Sud, F91400 Orsay

Orscilab
ORSCILAB

15 LES POLYNOMES
15 POLYNOMS
15.3 Fonctions / Functions
Version 2.1.2 du 28 janvier 2005 / Version 2.1.2, January 28th 2005
Biomodèles/Biomodels N°1 pp 0x-0y Décembre 2004 December 2004

Retour à la Table générale / Return to the General table
Index général / General index
Passage à la section suivante 15.4 / Next section 15.4

a
degree (Polynôme, Polynom)
b
varn (Polynôme, Polynom)
c
horner (Polynôme, Polynom)
d
roots (Polynôme, Polynom)
e
derivat (Polynôme, Polynom)
f
factors (Polynôme, Polynom)
g
simp (Polynôme, Polynom)

La fonction degree retourne le degré du polynome.
The function degree returns the degree of the polynom.

// PROGRAMME SPAS150301 degree
p = poly ([1, 2, 3], "x","coeff") ;
d = degree (p),

Ch15Sc03-Fig01

La fonction varn retourne le nom de l'indéterminée.
The function varn returns the name of the unknown.

// PROGRAMME SPAS150302 varn
p = poly ([1, 2, 3], "x","coeff") ;
s = varn (p),

Ch15Sc03-Fig02

La fonction horner évalue la valeur numérique d'un polynome.
The function horner computes the numerical value of a polynom.

// PROGRAMME SPAS150303 horner
p = poly ([2, 2*%i, 3], "x","coeff") ;
v = horner (p, 1+%i),

Ch15Sc03-Fig03

La fonction roots calcule les racines complexes d'un polynome. Les valeurs sont retournées dans un vecteur.
The function roots computes the complex roots of a polynom. The values are returned into a vector.

// PROGRAMME SPAS150304 roots
p = poly ([1, 2, 2, 1], "x","coeff") ;
v = roots (p),

Ch15Sc03-Fig04

La fonction derivat calcule le polynome dérivé d'un polynome.
The function derivat computes the polynom derivated from of a polynom.

// PROGRAMME SPAS150305 derivat
p = poly ([1, 2, 2, 1], "x","coeff") ;
q = derivat (p),

Ch15Sc03-Fig05

La fonction factors  factorise un polynome réel sous la forme d'une liste de polynomes réels de degrés 1 ou 2.
The function factors factorises a real polynom dunder the form of a list of real polynoms of degrees 1 or 2.

// PROGRAMME SPAS150306 factors
p = poly ([1, 2, 2, 1], "x","coeff") ;
q = factors (p),

Ch15Sc03-Fig06

NB : Il est possible de controler le degré d'approximation relatif ou absolu par une valeur de gain.
Note: it is possible to control the approximation relative or absolute by a value of gain.

La fonction simp appliquée à deux polynomes simplifie la fraction rationnelle correspondante et retourne les deux polynomes simplifiés. La fonction simp_mode doit être à l'état Vrai/True (voir la section 16.3)
The function simp applied to two polynoms simplifies the correspondig rational and returns the two polynoms simplified. The function simp_mode has to be at state True (see the section 16.3).

// PROGRAMME SPAS150307 simp
// PROGRAMME SPAS150307 simp
p1 = poly ([1, 2, 3], "x","roots") ;
p2 = poly ([1, 3, 5], "x","roots") ;
simp_mode(%T);
[p11,p22] = simp(p1,p2),

Ch15Sc03-Fig07

Retour à la Table générale / Return to the General table
Index général / General index
Passage à la section suivante 15.4 / Next section 15.4