Você está na página 1de 4

# 4/7/11 6:05 AM MATLAB Command Window 1 of 4

>> problem4
===================================================================
Matrix A
===================================================================

A =

1 2 3 4
2 3 4 5
3 4 5 6
4 5 6 7

===================================================================
Matrix B
===================================================================

B =

3 4 5 6
4 5 6 7
5 6 7 8
6 7 8 9

===================================================================
[D]=[A][B]
===================================================================

D =

50 60 70 80
68 82 96 110
86 104 122 140
104 126 148 170

## Clearly Matrix D is not symmetric

===================================================================
[D]=[B]T[A][B]
4/7/11 6:05 AM MATLAB Command Window 2 of 4

===================================================================

D =

## 1476 1784 2092 2400

1784 2156 2528 2900
2092 2528 2964 3400
2400 2900 3400 3900

## Clearly [D] is symmetric

D =

50 68 86 104
60 82 104 126
70 96 122 148
80 110 140 170

DT =

50 60 70 80
68 82 96 110
86 104 122 140
104 126 148 170

===================================================================
[A][B]=[C][B]
===================================================================
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 6.622383e-018.
> In problem4 at 25

C =

## 20.5000 26.0000 31.5000 37.0000

-5.0000 -6.0000 -7.0000 -8.0000
4/7/11 6:05 AM MATLAB Command Window 3 of 4

## -10.0000 -13.0000 -16.0000 -19.0000

34.5000 42.0000 49.5000 57.0000

===================================================================
det[A],prod[A],eig[A]
===================================================================

ans =

ans =

ans =

-1.1652
0.0000
0.0000
17.1652

ans =

17.1652

ans =

3.6089e+017

## Warning: Matrix is close to singular or badly scaled.

Results may be inaccurate. RCOND = 1.924222e-017.
> In problem4 at 34
4/7/11 6:05 AM MATLAB Command Window 4 of 4

ans =

1.0e+015 *

## 0.2881 0.0096 -0.8834 0.5858

0.0096 -0.6002 1.1715 -0.5810
-0.8834 1.1715 0.3073 -0.5954
0.5858 -0.5810 -0.5954 0.5906

>>