How to solve this matrix using inverse function?
Afficher commentaires plus anciens
I want to use the inverse function (inv) on this 10 x 10 matrix but I keep getting all this Inf in place of the numbers.
The matrix goes as follows,
clc,clear all
a = [1 2 3 4 5 6 7 8 9 10];
b = [21 22 23 24 25 26 27 28 29 30];
c = [11 12 13 14 15 16 17 18 19 20];
d = [31 32 33 34 35 36 37 38 39 40];
f = [41 42 43 44 45 46 47 48 49 50];
g = [61 62 63 64 65 66 67 68 69 70];
h = [51 52 53 54 55 56 57 58 59 60];
i = [81 82 83 84 85 86 87 88 89 90];
j = [91 92 93 94 95 96 97 98 99 100];
e = [1 2 3 4 5 6 7 8 9 10];
aa = sum(a);
bb = sum(b);
cc = sum(c);
dd = sum(d);
ff = sum(f);
gg = sum(g);
hh = sum(h);
ii = sum(i);
jj = sum(j);
ee = sum(e);
AA = [a ;b ;c ;d ;e ;f ;g ;h ;i ;j];
b = [aa ;bb ;cc ;dd ;ff ;gg ;hh ;ii ;jj ;ee];
Res = inv(A)
The result I am getting is this one,
Warning: Matrix is singular to working precision.
> In borrame at 39
Res =
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Why if the command (inv) not working? Please help.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!