MATLAB POLYSPACE RELEASE NOTES Manuel d'utilisateur Page 41

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 240
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 239 240

Commentaires sur ces manuels

Pas de commentaire