Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Solve the system of equations
Replies: 12   Last Post: Feb 20, 2013 8:45 AM

 Messages: [ Previous | Next ]
 Greg Heath Posts: 6,263 Registered: 12/7/04
Re: Solve the system of equations
Posted: Feb 13, 2013 7:03 PM

"Milos Milenkovic" <m.milenkovic@mathworks.com> wrote in message <kffujm\$dk2\$1@newscl01ah.mathworks.com>...
> Dear all,
> I have a system of equations D=A*X*B, X=?, A,B,D are known, but using the solve command, I obtain empty set as solution. The elements of matrices are:
>
> A=[0.06 0.07 0.08 0.09 0.1 0.09; 0.01 0.02 0.03 0.04 0.05 0.06; -0.01 -0.02 -0.03 -0.04 -0.04 0.05; 0 0.01 0.02 0.03 0.04 0.05; -0.06 -0.05 -0.04 -0.03 -0.02 -0.01;
> 0.01 0.02 0.03 0.04 0.05 0.06];
>
> syms X x11 x12 x13 x14 x15 x16 x21 x22 x23 x24 x25 x26 x31 x32 x33 x34 x35 x36 x41 x42 x43 x44 x45 x46 x51 x52 x53 x54 x55 x56 x61 x62 x63 x64 x65 x66;
>
> X=[x11 x12 x13 x14 x15 x16;x21 x22 x23 x24 x25 x26;x31 x32 x33 x34 x35 x36;x41 x42 x43 x44 x45 x46;x51 x52 x53 x54 x55 x56;x61 x62 x63 x64 x65 x66];
>
> B=[-1 0 0 0 0 0; 0 -1 0 0 0 0; 0 0 -1 0 0 0; 0 0 0 -1 0 0; 0 0 0 0 -1 0; 0 0 0 0 0 -1];
>
> D=[0.57 0.57 23.96 0 0.57 0.57; 0.57 0.57 23.96 0 0.57 0.57; 23.96 23.96 3027.70 0 23.96 23.96;0 0 0 0 0 0;0.57 0.57 23.96 0 0.57 0.57;0.57 0.57 23.96 0 0.57 0.57];
>
> What is the problem here?

=====================
>> condA = cond(A)
condB = cond(B)

condA = 1.4662e+017
condB = 1

>> X = pinv(A)*D/B

X = 1.0e+005 *

-0.0127 -0.0127 -1.5421 0 -0.0127 -0.0127
0.0001 0.0001 0.0026 0 0.0001 0.0001
0.0128 0.0128 1.5472 0 0.0128 0.0128
0.0255 0.0255 3.0919 0 0.0255 0.0255
-0.0258 -0.0258 -3.1043 0 -0.0258 -0.0258
0.0001 0.0001 0.0055 0 0.0001 0.0001

>> E = norm(D-A*X*B)

E = 20.3620

Hope this helps.

Greg

Date Subject Author
2/13/13 Milos Milenkovic
2/13/13 Torsten
2/13/13 Milos Milenkovic
2/13/13 Torsten
2/13/13 Milos Milenkovic
2/13/13 Greg Heath
2/14/13 Greg Heath
2/14/13 Milos Milenkovic
2/15/13 Milos Milenkovic
2/15/13 Christopher Creutzig
2/15/13 Milos Milenkovic
2/15/13 Milos Milenkovic
2/20/13 Christopher Creutzig