MATLAB FINANCIAL DERIVATIVES TOOLBOX Manual de usuario Pagina 50

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 119
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 49
49
n
m
nm
n
n
mm
mm
bxa...xaxa
bxa...xaxa
bxa...xaxa
=+++
=+++
=+++
2211
221222121
11212111
M
The solution of the above system can be expressed as:
bAx
1
=
given that “
1
A
” (that represents the inverse matrix of “
A
”) exists and the
number of equation, n, is equal or greater than the number of unknowns, m.
A unique solution to the above equation system exists when: n=m.
Matlab has standard and efficient specialized routines to solve such systems
like the
m
m
l
l
d
d
i
i
v
v
i
i
d
d
e
e function (called alternatively with “\”). Otherwise, a quick
way (but some times non practical and inaccurate if the number of
equations is extremely large) to solve the above system is via the inverse
function,
i
i
n
n
v
v (note that the
i
i
n
n
v
v can be used only with square matrices). View
the following example to understand how you can solve a small system of
linear equations:
Matlab’s command:
>> clear; A=[2 4 3; -2 -4 2; 6 4 2]; b=[2 ;4;1];
>> x1=inv(A)*b, x2=A\b
Matlab’s response:
x1 =
0.0500
-0.4250
1.2000
x2 =
0.0500
-0.4250
1.2000
Comments:
Two ways for solving a system of linear equations.
Vista de pagina 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 118 119

Comentarios a estos manuales

Sin comentarios