MATLAB FINANCIAL DERIVATIVES TOOLBOX Manuel d'utilisateur Page 38

  • 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 37
37
Matlab’s response:
ans =
1
x =
1.0000 2.8000 4.6000 6.4000 8.2000 10.0000
x =
1.2589 1.5136 1.8197 2.1878 2.6303 3.1623 0.1000
ans =
0.1000 1.2589 1.5136 1.8197 2.1878 2.6303 3.1623
ans =
1.2589 2.7725 4.5922 6.7799 9.4102 12.5725 12.6725
Max =
3.1623
I =
6
ans =
0.1000
Comments:
Examples with vector functions. The first command instructs for
the creation of an empty vector. The
i
i
s
s
e
e
m
m
p
p
t
t
y
y function returns 1
for the true statement of an empty vector. Afterwards,
l
l
i
i
n
n
s
s
p
p
a
a
c
c
e
e is
used to generate a row vector of 6 linearly equally spaced points
between 1 and 10 whereas
l
l
o
o
g
g
s
s
p
p
a
a
c
c
e
e is used to generate a row
vector of 6 logarithmically equally spaced points between decades
10^0.1 and 10^0.5. “x(7)=0.1” instructs for the creation of a
seventh element for the
x
x vector. “
s
s
o
o
r
r
t
t(x)” sorts the elements of
x
x
in ascending order,
c
c
u
u
m
m
s
s
u
u
m
m(x)” is a vector containing the
cumulative sum of the elements of
x
x, “[Max, I]=
m
m
a
a
x
x(x)” returns in
M
M
a
a
x
x the maximum value of the vector
x
x and in
I
I the index of the
maximum element. The last command, “x(
e
e
n
n
d
d)” returns the last
element of the
x
x vector.
2.2 Two Dimensional Arrays (Matrices)
A
n
m
×
matrix is a rectangular array that has m rows and n columns. For
example, a 2-by-4 matrix can be the following one:
=
×
24232221
14131211
42
aaaa
aaaa
A
Vue de la page 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 118 119

Commentaires sur ces manuels

Pas de commentaire