Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: solving for 2 angles

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89826] Re: solving for 2 angles
  • From: "Dr. Wolfgang Hintze" <weh at snafu.de>
  • Date: Sat, 21 Jun 2008 05:33:22 -0400 (EDT)
  • References: <g3g00h$kvd$1@smc.vnet.net>

"Steve" <srjm72499 at gmail.com> schrieb im Newsbeitrag 
news:g3g00h$kvd$1 at smc.vnet.net...
>I have two equations with unknown angles az and el:
>
> J*cos(az)*sin(el)+K*sin(az)*sin(el)+L*cos(el)=0;
> M*cos(az)*sin(el)+N*sin(az)*sin(el)+P*cos(el)=0;
>
> Is it a simple matter to solve for the angles?
>
> I tried taking the first equation, and re-writing as:
>
> sin(el)*[J*cos(az)+K*sin(az) ] = -L*cos(el)
>
> which leads to
>
> el= atan(-L / [J*cos(az)+K*sin(az)])
>
> I then subsituted this into the second equation, but was not able to
> isolate the az variable.
>
> I would appreciate any help...
>
> Thanks.
>
> -Steve
>
You should write the expressions in Mathematica syntax.

Then the equations

eq1 = J*Cos[az]*Sin[el] + K*Sin[az]*Sin[el] + L*Cos[el] == 0;
eq2 = M*Cos[az]*Sin[el] + N*Sin[az]*Sin[el] + P*Cos[el] == 0;

are solved like this

sol = Simplify[Solve[eq1 && eq2, {az, el}]];
(dropping here the lengthy expressions for
el -> ArcCos[...], az -> ArcCos[...]
containing J, K, .., P)

The result consists of 16 solutions
Length[sol]
16

Regards,
Wolfgang 



  • Prev by Date: Re: Mathematica 6.0 - Legend
  • Next by Date: Re: fit plane to xz axis of data
  • Previous by thread: Re: solving for 2 angles
  • Next by thread: Re: solving for 2 angles