MATLAB POLYSPACE RELEASE NOTES Manual do Utilizador Página 30

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 240
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 29
2 Matrices and Arra ys
regarded as one long column vector formed from the columns of the original
matrix. So,forourmagicsquare,
A(8) is another way of referring to the
value
15 stored in A(4,2).
If you try to use the value of an element outside of the matrix, it is an error:
t = A(4,5)
Index exceeds matrix dimensions.
On the other hand, if you store a value in an element outside of the matrix,
the size increases to accommodate the newcomer:
X=A;
X(4,5) = 17
X=
1632130
51011 8 0
967120
41514 117
The Colon Operator
The colon, :, is one of the most important MATLAB operators. It occurs in
several different forms. The expression
1:10
is a row vector containing the integers from 1 to 10:
12345678910
To obtain nonunit spacing, specify an increment. For example,
100:-7:50
is
10093867972655851
and
0:pi/4:pi
2-8
Vista de página 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 239 240

Comentários a estes Manuais

Sem comentários