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

20 LES MATRICES DE COMPLEXES/FLOTTANTS
20 MATRICES OF COMPLEX/FLOAT
20.2 Opérations élémentaires / Elementary operations
Version 2.1.2 du 28 Février 2005 / Version 2.1.2, February 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 20.3 / Next section 20.3

b
nnz (Matrice, Matrix)
c
tril (Matrice, Matrix)
triu (Matrice, Matrix)

d
diag (Matrice, Matrix)

La fonction  nnz donne le nombre d'éléments non nuls d'une matrice de complexes/flottants.
The function nnz  lgives the number of not-null elements of a complex/float matrix.


// PROGRAMME SPAS200205
m = [1, 0, 3; 0, 5, 6; 7, 8, 0];
n = nnz (m),

Ch20Sc02-Fig05

Les fonctions tril et triu extraient les matrices triangulaires inférieure et supérieure d'une matrice de complexes/flottants.
The functions tril  and triu extract the lower and upper triangular matrices of a complex/float matrix.


// PROGRAMME SPAS200206
m = [1, 2, 3; 4, 5, 6; 7, 8, 9];
m1 = tril (m),
m2 = triu (m),


Ch20Sc02-Fig06


En précisant un deuxième argument, on indique le nombre de diagonales à considérer en plus ou en moins.
Adding a second argument notices the number of diagonals in more or less to be considered.


// PROGRAMME SPAS200207
m = [1, 2, 3, 4; 5, 6, 7, 8; 9, 10, 11, 12; 13, 14, 15, 16];
m1 = tril (m, 1),
m2 = tril (m, 2),
m3 = tril (m, 0),
m4 = tril (m, -1),
m5 = tril (m, -2),

Ch20Sc02-Fig07


// PROGRAMME SPAS200208
m = [1, 2, 3, 4; 5, 6, 7, 8; 9, 10, 11, 12; 13, 14, 15, 16];
m1 = triu (m, 1),
m2 = triu (m, 2),
m3 = triu (m, 0),
m4 = triu (m, -1),
m5 = triu (m, -2),

Ch20Sc02-Fig08


La fonction diag extrait le vecteur diagonale d'une matrice de complexes/flottants.
The function diag extracts the vector diagonal of a complex/float matrix.


// PROGRAMME SPAS200209
m = [1, 2, 3; 4, 5, 6; 7, 8, 9];
m1 = diag (m),

Ch20Sc02-Fig09


En précisant un deuxième argument, on indique le rang de la diagonale à considérer..
Adding a second argument notices the rank of the diagonal to be considered.


// PROGRAMME SPAS200210
m = [1, 2, 3, 4; 5, 6, 7, 8; 9, 10, 11, 12; 13, 14, 15, 16];
m1 = diag (m, 1),
m2 = diag (m, 2),
m3 = diag (m, 0),
m4 = diag (m, -1),
m5 = diag (m, -2),

Ch20Sc02-Fig10


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