Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!newshosting.com!69.16.185.51.MISMATCH!tmp-post01.iad!news.highwinds-media.com!not-for-mail
Message-ID: <48EE355C.9000106@yahoo.com>
Date: Thu, 09 Oct 2008 12:46:20 -0400
From: Freelance Embedded Systems Engineer <g9u5dd43@yahoo.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
To: Damien <xennox268@gmail.com>
Subject: Re: Linear Simlutaneous Equations
References: <gcl2c8$hf$1@fred.mathworks.com>
In-Reply-To: <gcl2c8$hf$1@fred.mathworks.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 34
Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com
NNTP-Posting-Host: 75.184.122.147
X-Complaints-To: abuse@newshosting.com
Xref: news.mathworks.com comp.soft-sys.matlab:494395


Damien wrote:
> Hi all, I have the following six equations: 
> 1. Reaction-Y1 + Force13*sin(A1) + Force12*sin(A3) = 0
> 2. Reaction-X1 + Force13*cos(A1) + Force12*cos(A3) = 0
> 3. Reaction-Y2 + Force21*sin(A1) + Force23*sin(A2) = 0
> 4. Reaction-X2 + Force21*cos(A1) + Force23*cos(A2) = 0
> 5. Reaction-Y3 + Force31*sin(A2) + Force32*sin(A3) = 0
> 6. Reaction-X3 + Force31*cos(A2) + Force32*cos(A3) = 0
> 
> I have calculated the Reaction values for all 6 of them, and all the
> angles of each of them. How would I substitute these equations into a
> Matrix, so that I can solve for the forces, using the form of
> AX = B
> Where A is a square matrix, X is a vector of unknowns (Forces) and B
> is a vector of knowns, i.e, the Reactions forces.
> Any help will be appreciated. Thanks. Damien

Just rewrite is as a matrix/vector equation the same way that you stated it.

[sin(A3) sin(A1)      0       0      0       0  ] [Force12]  [Reaction-Y1]
[cos(A3) cos(A1)      0       0      0       0  ] [Force13]  [Reaction-X1]
[     0       0  sin(A1) sin(A2)     0       0  ]*[Force21]= [Reaction-Y2]
[     0       0  cos(A1) cos(A2)     0       0  ] [Force23]  [Reaction-X2]
[     0       0       0       0 sin(A2) sin(A3) ] [Force31]  [Reaction-Y3]
[     0       0       0       0 cos(A2) cos(A3) ] [Force32]  [Reaction-X3]


                                              [A]*[X] = [B]

X = inv(A)*B if the inverse exists.
Otherwise, using the pseudoinverse to give you a leastsquare solution.
X = A\B

Note the wrap-around pattern of A3-A1,A1-A2,A2-A3