From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: sym and solve
Date: Sun, 15 Jan 2012 21:11:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <jevfdc$6u2$>
References: <jeuvdg$l2f$> <jevafr$m8f$> <jevbn8$ppj$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1326661868 7106 (15 Jan 2012 21:11:08 GMT)
NNTP-Posting-Date: Sun, 15 Jan 2012 21:11:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:754763

"J├╝rgen" wrote in message <jevbn8$ppj$>...

> "Roger Stafford" wrote in message <jevafr$m8f$>...
> >   There are certainly easier ways of approaching that problem.  For example you could invoke the cosine law of triangles and use matlab's 'acos' to solve it very easily without all the above fuss.  It would show you that for real solutions there are always either two roots, one root, or none, depending on the distance to the point (s,t) from the origin.

> but I'll first take a look at if I can use the cosinus rule, I did not try that yet
- - - - - - - - - -
  I was a little hasty in that last paragraph.  I should have said you could use the sine law of triangles, and that, depending on the distance from (s,t) to the origin and the specified angle, there could be anywhere from none to four solutions for (x,y).  The sine law permits you to determine the (signed) angle between the vector (s,t) and (x-s,y-t) to one of two (or four) possibilities.  Knowing the angle between (s,t) and the x-axis will then let you find x and y.

Roger Stafford