MATLAB FINANCIAL DERIVATIVES TOOLBOX Manuel d'utilisateur Page 30

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 119
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 29
29
2.1.2 Column Vectors
Column vectors are created via the use of semi-colon “;” instead of commas
and spaces. Operations with column vectors are similar as with row vectors.
The following examples depict the manipulation of column vectors.
Matlab’s command:
>> cv=[1;4;7;9]
Matlab’s response:
cv =
1
4
7
9
Comments:
Creating a four-element column vector.
Matlab’s command:
>> length(cv)
Matlab’s response:
ans =
4
Comments:
Taking the vector’s length.
Matlab’s command:
>> CV=[cv(1:2)+2; cv(2:3)*5]
Matlab’s response:
CV =
3
6
20
35
Comments:
Creating
C
C
V
V that is a four-element column vector. Its first two
elements are the two first elements of
c
c
v
v increased by 2 whereas
the last two elements are the 2
nd
and 3
rd
elements of
c
c
v
v multiplied
by 5.
Vue de la page 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 118 119

Commentaires sur ces manuels

Pas de commentaire