MATLAB FINANCIAL DERIVATIVES TOOLBOX Manual de usuario Pagina 30

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 119
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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.
Vista de pagina 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 118 119

Comentarios a estos manuales

Sin comentarios