MATLAB POLYSPACE RELEASE NOTES Manual do Utilizador Página 41

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 240
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 40
Working w ith Matrices
Deleting Rows an
dColumns
You can delete ro
ws and columns from a matrix using just a pair of square
brackets. Start
with
X=A;
Then, to delete t
he second column of
X,use
X(:,2) = []
This changes X to
X=
16 2 13
511 8
9712
414 1
If you d elete a si
ngle element from a matrix, the result is not a matrix
anymore. So, exp
ressions like
X(1,2) = []
result in an erro
r. Howev e r, usin g a single subscript deletes a single element,
or sequence of e
lements, and reshapes the remaining elements into a row
vector. So
X(2:2:10) = []
results in
X=
1692713121
2-19
Vista de página 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 239 240

Comentários a estes Manuais

Sem comentários