- Aide Scilab
- Scilab
- Mots clés Scilab
- TMPDIR
- abort
- argn
- banner
- boolean
- break
- clear
- clearglobal
- comp
- debug
- errcatch
- errclear
- error
- exists
- exit
- external
- extraction
- getos
- getshell
- gstacksize
- ieee
- insertion
- inv_coeff
- iserror
- isglobal
- macr2tree
- matrices
- matrix
- mode
- mtlb_mode
- names
- null
- pause
- perl
- poly
- predef
- quit
- rational
- resume
- sciargs
- scilab
- stacksize
- startup
- symbols
- testmatrix
- type
- typename
- user
- varn
- what
- where
- whereami
- who
- whos
- with_atlas
- with_javasci
- with_macros_source
- with_pvm
- add_demo
- clearfun
- continue
- delbpt
- dispbpt
- edit
- error_table
- format
- funcprot
- funptr
- getdebuginfo
- getmd5
- getmemory
- getmodules
- getscilabmode
- getvariablesonstack
- getversion
- intppty
- lasterror
- macr2lst
- newfun
- readgateway
- setbpt
- ver
- warning
- who_user
- with_module
- with_texmacs
- with_tk
matrix
remise en forme d'une matrice
Séquence d'appel
y=matrix(v,n,m) y=matrix(v,[sizes])
Paramètres
- v
un vecteur, une matrice ou une hypermatrice
- n,m
entiers
- sizes
vecteur d'entiers
- y
un vecteur, une matrice ou une hypermatrice
Description
Pour un vecteur ou une matrice de taille n x m, la commande
y=matrix(v,n,m) ou y=matrix(v,[n,m])
transforme le vecteur (ou la matrice) v en une matrice nxm en parcourant les éléments colonne par colonne v.
Si l'une des dimensions m ou n est égale à -1 elle est remplacée par le quotient de size(v,'*') par l'autre dimension.
Pour une hypermatrice telle que prod(size(v))==prod(sizes), la commande y=matrix(v,sizes) (ou de façon équivalente, y=matrix(v,n1,n2,...nm)) transforme v en une matrice ou une hypermatrice
en parcourant les éléments de v (parcourus tel que le premier indice varie en premier). y=matrix(v,sizes) renvoie une matrice ou un vecteur si sizes est un scalaire ou un vecteur à deux composantes.
Exemples
a=[1 2 3;4 5 6] matrix(a,1,6) matrix(a,1,-1) matrix(a,3,2)
Voir aussi
| << matrices | Scilab | mode >> |