MATLAB FINANCIAL DERIVATIVES TOOLBOX User Manual Page 51

  • Download
  • Add to my manuals
  • Print
  • Page
    / 119
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 50
50
To see that these two procedures lead to different results, elaborate on the
following example (search online help to see the use of the command:
p
p
a
a
s
s
c
c
a
a
l
l):
Matlab’s command:
>> clear; A=pascal(10); b=[5; -2; 4; 8; 1; 2; 0; -6; 2; 3];
>> x1=inv(A)*b;, x2=A\b;
>>diff=x1-x2
Matlab’s response:
diff =
-1.0328 e-006
9.0204 e-006
-3.4539 e-005
7.6293 e-005
-0.00010781
0.0001013
-6.3407 e-005
2.5521 e-005
-5.9979 e-006
6.2738 e-007
Comments:
For even moderate linear systems, the two methods (
i
i
n
n
v
v
and “\”)
lead to different solutions. If high precision is required, then the
researcher should prefer the “\”.
The most proper way for large systems is the use of “\”. See the help
facilities for details on
i
i
n
n
v
v and on “\”.
Page view 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 118 119

Comments to this Manuals

No comments