- Ajuda Scilab
 - Scilab
 - Scilab palavra-chave
 - abort
 - add_demo
 - argn
 - banner
 - boolean
 - break
 - clear
 - clearfun
 - clearglobal
 - comp
 - continue
 - debug
 - delbpt
 - dispbpt
 - edit
 - errcatch
 - errclear
 - error
 - error_table
 - exists
 - exit
 - external
 - extraction
 - format
 - funcprot
 - funptr
 - getdebuginfo
 - getmd5
 - getmemory
 - getmodules
 - getos
 - getscilabmode
 - getshell
 - getvariablesonstack
 - getversion
 - gstacksize
 - ieee
 - insertion
 - intppty
 - inv_coeff
 - iserror
 - isglobal
 - lasterror
 - macr2lst
 - macr2tree
 - matrices
 - matrix
 - mode
 - mtlb_mode
 - names
 - newfun
 - null
 - pause
 - perl
 - poly
 - predef
 - quit
 - rational
 - readgateway
 - resume
 - sciargs
 - scilab
 - setbpt
 - stacksize
 - startup
 - symbols
 - testmatrix
 - type
 - typename
 - user
 - varn
 - ver
 - warning
 - what
 - where
 - whereami
 - who
 - who_user
 - whos
 - with_atlas
 - with_javasci
 - with_macros_source
 - with_module
 - with_pvm
 - with_texmacs
 - with_tk
 - TMPDIR
 
Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
matrix
Muda a forma de vetores ou matrizes
Seqüência de Chamamento
y=matrix(v,n,m) y=matrix(v,[sizes])
Parâmetros
- v
 vetor, matriz ou hipermatriz
- n,m
 inteiros
- sizes
 vetor de inteiros
- y
 vetor, matriz ou hipermatriz
Descrição
Para um vetor ou matriz com n x
    m entradas, o comando
    y=matrix(v,n,m) ou, de modo similar,
    y=matrix(v,[n,m]) transforma o vetor (ou matriz)
    v em uma matriz nxm empilhando as
    entradas coluna a coluna de v.
Se uma das dimensões m ou n é igual a -1, ela é automaticamente atribuída ao quociente de tamanho (v,'*') pela outra dimensão,
Para uma hipermatriz tal como
    prod(size(v))==prod(sizes), o comando
    y=matrix(v,sizes) (ou equivalentemente
    y=matrix(v,n1,n2,...nm)) transforma
    v em uma matriz ou hipermatriz empilhando "coluna a
    coluna" as entradas de v (a primeira dimensão variando
    primeiro). y=matrix(v,sizes) resulta numa matriz
    regular se os tamanhos são escalares ou um vetor de duas entradas.
Exemplos
a=[1 2 3;4 5 6] matrix(a,1,6) matrix(a,1,-1) matrix(a,3,2)
| << matrices | Scilab | mode >> |