Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
MATDIAG
Création de matrice diagonale
Aperçu
 
Contenu
Description
Le bloc MATDIAG crée une matrice diagonale à partir d'un vecteur. Si l'entrée est un vecteur Mx1 alors la sortie est une matrice MxM.
La fonction équivalente de MATDIAG dans Scilab est diag(vm) avec vm un vecteur colonne.
Paramètres
 
- Datatype (1=real double 2=Complex) - Il indique le type de la sortie. Il supporte seulement les types double (1) et complexe (2). Si on entre une autre valeur dans ce paramètre, Xcos affiche le message "Datatype is not supported". - Propriétés : Type 'vec' de taille 1. 
Exemple
Si l'entrée du bloc est U = ones(5, 1) alors la sortie est : y = [1 0 0 0 0 ; 0 1 0 0 0 ; 0 0 1 0 0 ; 0 0 0 1 0 ; 0 0 0 0 1]
Propriétés par défaut
- always active: non 
- direct-feedthrough: oui 
- zero-crossing: non 
- mode: non 
- regular inputs: - - port 1 : size [-1,1] / type 1 
- regular outputs: - - port 1 : size [-1,-1] / type 1 
- number/sizes of activation inputs: 0 
- number/sizes of activation outputs: 0 
- continuous-time state: non 
- discrete-time state: non 
- object discrete-time state: non 
- name of computational function: mat_diag 
Fonction d'interfaçage
- SCI/modules/scicos_blocks/macros/MatrixOp/MATDIAG.sci 
Fonctions de calcul
- SCI/modules/scicos_blocks/src/c/mat_diag.c
- SCI/modules/scicos_blocks/src/c/matz_diag.c
Exemple de diagonale :
 
Voir aussi
- EXTTRI — Extraction triangulaire ou diagonale
- diag (Fonction Scilab) — extraction de diagonale ou construction d'une matrice avec un vecteur en diagonal
| Report an issue | ||
| << MATDET | Palette Opérations matricielles | MATDIV >> |