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 II
Replies: 2   Last Post: Feb 15, 2013 12:57 PM

Advanced Search

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

Posts: 159
Registered: 4/4/09
Solve the system of equations II
Posted: Feb 15, 2013 9:50 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear all,
> > > > what if there is an implicit conditional equation like D=B*X*B' + A*X*A', X=?, A,B,D are known. Can I use the concept proposed by Greg?
Best,
M
> > > >
> > > > 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];


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];

Greg's approach =>

> > > >> 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

> >
> > >> F = norm(D)
> >
> > F = 3.0285e+003
> >

> > >> G = norm(A*X*B)
> >
> > G = 3.0284e+003
> >

> > >> relerr = E/F
> >
> > relerr = 0.0067




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.