Re: equations

• To: mathgroup at smc.vnet.net
• Subject: [mg3825] Re: equations
• From: peter at physto.se (Peter W)
• Date: Sat, 27 Apr 1996 00:58:38 -0400
• Organization: Stockholm University
• Sender: owner-wri-mathgroup at wolfram.com

```In article <4l796a\$1ov at ralph.vnet.net>, michael.probst at uibk.ac.at says...
>
>I have not seen my mail appearing in the newslist -
>sorry if it's there twice.
>
>Hi, Experts !
>I have a mma - question concerning equation solving.
>I understand how to use Solve and Eleminate for basic
>problems but still my problem escapes me.
>It's rather simple.
>I have a rotation matrix rm:
>MatrixForm[rm]
>-0.772889    -0.568925    -0.28101
> 0.633718    -0.71461     -0.296198
>-0.0322979   -0.407009     0.912853
>
>which I know must be equal to the rotation matrix qrm:
>
>MatrixForm[qrm]
>  2     2     2     2
>q0  + q1  - q2  - q3 ........
>

I used Solve on the four first eqs's and i got four complex sol's, I
guess that if I use some combination of four other eq's I get other
solutions in q but if the equations are consistent at least one solution
should be common.
I did:
eqns={
q0^2 + q1^2- q2^2- q3^2==-0.772889 ,
2 (q1 q2 - q0 q3)==-0.568925 ,
2 (q0 q2 + q1 q3)==-0.28101,
q1 q2 + q0 q3==0.633718}

and:
Solve[eqns,{q0,q1,q2,q3}]

and I got:
{{q0 -> -0.40173 - 0.0541109 I, q1 -> 0.0938041 - 0.231738 I,
q2 -> 0.262086 + 0.647469 I, q3 -> -1.12242 + 0.151184 I},
{q0 -> -0.40173 + 0.0541109 I, q1 -> 0.0938041 + 0.231738 I,
q2 -> 0.262086 - 0.647469 I,  q3 -> -1.12242 - 0.151184 I},
{q0 -> -0.151184 - 1.12242 I, .......

By the way, there are methods for solving overdetermined equation systems
(the solution will be the best fit to the equations in leastsquares
sense) I have not done this in mma but with Matlab it is simple.
I hope this helps
/Peter Weijnitz

==== [MESSAGE SEPARATOR] ====

```

• Prev by Date: Re: equations
• Next by Date: Function
• Previous by thread: Re: equations
• Next by thread: Using mathematica for vector math