MATLAB FINANCIAL DERIVATIVES TOOLBOX Manual do Utilizador Página 110

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 119
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 109
109
2
21212121
2
1
2
4h
)hx,hx(f)hx,hx(f)hx,hx(f)hx,hx(f
xx
)x(f +++++
1
2
2
2
1
2
xx
)x(f
xx
)x(f
2
21212121
2
2
2
4
2222
h
)hxx(f)hxx(f)hxx(f)hxx(f
x
)x(f +++
where h is given from a rule of thumb (see [4] page 103),
4
1 = )|,xmax(|h
Having in mind the above, write a script with the name: FunctionMin.m that
will do the following:
Make the 3D surface and the contour plots of the function:
)yxyyx(e)x,x(f
x
12424
22
21
++++=
in the area
5
1
2
.y,x
. The function should be saved in an m-file
with the name:
f
f
u
u
n
n
T
T
o
o
M
M
i
i
n
n. Given that you have created the m-file with
the functional form of the function, to evaluate it at a point use the
build in function:
f
f
e
e
v
v
a
a
l
l. The calling syntax is:
f
f
e
e
v
v
a
a
l
l(@funToMin,x)”
where x is a two element row vector (or m-by-2 array) with “x(1)” and
“x(2)” to represent x
1
and x
2
respectively.
Do a new figure that creates the contour plot of this function, with
the value of the contours to range between 0 and 80 (for example use:
“V=[0:0.25:2, 3:1:10, 20:10:80]”).
Vista de página 109
1 2 ... 105 106 107 108 109 110 111 112 113 114 115 ... 118 119

Comentários a estes Manuais

Sem comentários