Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!i25g2000yqm.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Equations depicting 2 DOF
Date: Mon, 12 Apr 2010 04:24:22 -0700 (PDT)
Organization: http://groups.google.com
Lines: 25
Message-ID: <9232e424-2373-46c9-95e4-b6c24ba9c71c@i25g2000yqm.googlegroups.com>
References: <hpurlj$g9g$1@fred.mathworks.com>
NNTP-Posting-Host: 77.19.108.124
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1271071462 27198 127.0.0.1 (12 Apr 2010 11:24:22 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 12 Apr 2010 11:24:22 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: i25g2000yqm.googlegroups.com; posting-host=77.19.108.124; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; 
	Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; 
	.NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:625746

On 12 apr, 12:12, "Imran " <imran.sh...@gmail.com> wrote:
> Dear All
> Good day
> I have to find solution to following two equations
>
> L1 Cos (theta1)+ L2 Cos (theta2)=x
> L1 Sin (theta1) + L2 Sin (theta2)=y
> here L1, L2, x and y are known
>
> is there any direct function available?

Depends on what you want to solve for. If you are happy to
find the cosines and sines (as opposed to the angles) all
you need to do is to add the constraints

cos(theta1)^2 + sin(theta1)^2 = 1
cos(theta2)^2 + sin(theta2)^2 = 1

in which case you will end up with four equations in four
unknowns, which are easily solved.

If you want to find the angles theta1 and theta2 you have
trouble, as the inverse sines and cosine functions are ambiguous.

Rune