Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Milos Milenkovic

Posts: 167
Registered: 4/4/09
Re: Solve the system of equations
Posted: Feb 13, 2013 10:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear Torsten,
in that case, everything is ok. Thank you.
Best,
M

"Torsten" wrote in message <kfg892$han$1@newscl01ah.mathworks.com>...
> "Milos Milenkovic" <m.milenkovic@mathworks.com> wrote in message <kfg5vq$8nk$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kfg06b$iqb$1@newscl01ah.mathworks.com>...
> > > "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?
> > > >
> > > > Best,
> > > > Milos

> > >
> > > Why symbolic variables ?
> > > X=-A\D .
> > >
> > > Best wishes
> > > Torsten.

> >
> >
> > Dear Torsten,
> > thank you for your quick response!! Sorry, but I think that this solution is not good. The answer for X is:
> > X =
> > 1.0e+18 *
> > 0.0329 0.0329 1.3812 0 0.0329 0.0329
> > 0.0329 0.0329 1.3812 0 0.0329 0.0329
> > -0.1643 -0.1643 -6.9060 0 -0.1643 -0.1643
> > 0.0986 0.0986 4.1436 0 0.0986 0.0986
> > -0.0000 -0.0000 -0.0000 0 -0.0000 -0.0000
> > 0 0 0 0 0 0
> > which, replaced in A*X*B is not equal to D =>
> >
> > A*X*B is
> > Y=A*X*B
> > Y =
> > 1.0e+03 *
> > 0.0013 0.0013 0.0040 0 -0.0027 -0.0027
> > 0.0021 0.0021 0.0340 0 -0.0009 -0.0009
> > 0.0212 0.0212 2.9232 0 0.0242 0.0242
> > 0.0008 0.0008 0.0208 0 -0.0007 -0.0007
> > -0.0027 -0.0027 -0.0904 0 -0.0007 -0.0007
> > 0.0021 0.0021 0.0340 0 -0.0009 -0.0009
> >
> > but D is
> > D =
> > 1.0e+03 *
> > 0.0006 0.0006 0.0240 0 0.0006 0.0006
> > 0.0006 0.0006 0.0240 0 0.0006 0.0006
> > 0.0240 0.0240 3.0277 0 0.0240 0.0240
> > 0 0 0 0 0 0
> > 0.0006 0.0006 0.0240 0 0.0006 0.0006
> > 0.0006 0.0006 0.0240 0 0.0006 0.0006
> >
> > So the relation
> > D=A*X*B is not fulfilled.
> > Best,
> > M

>
> Your matrix A is singular (2nd and 6th row are identical) - so you can not expect that you can find X that satisfies your linear system exactly.
> Take a look at the MATLAB documentation for the solution of underdetermined
> linear systems of equations.
>
> Best wishes
> Torsten.
>




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.