<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237214</link>
    <title>MATLAB Central Newsreader - Linear Simlutaneous Equations</title>
    <description>Feed for thread: Linear Simlutaneous Equations</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 09 Oct 2008 13:53:12 -0400</pubDate>
      <title>Linear Simlutaneous Equations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237214#604364</link>
      <author>Damien </author>
      <description>Hi all,&lt;br&gt;
&lt;br&gt;
I have the following six equations:&lt;br&gt;
&lt;br&gt;
1. Reaction-Y1 + Force13*sin(A1) + Force12*sin(A3) = 0&lt;br&gt;
2. Reaction-X1 + Force13*cos(A1) + Force12*cos(A3) = 0&lt;br&gt;
3. Reaction-Y2 + Force21*sin(A1) + Force23*sin(A2) = 0&lt;br&gt;
4. Reaction-X2 + Force21*cos(A1) + Force23*cos(A2) = 0&lt;br&gt;
5. Reaction-Y3 + Force31*sin(A2) + Force32*sin(A3) = 0&lt;br&gt;
6. Reaction-X3 + Force31*cos(A2) + Force32*cos(A3) = 0&lt;br&gt;
&lt;br&gt;
I have calculated the Reaction values for all 6 of them, and all the angles of each of them.&lt;br&gt;
&lt;br&gt;
How would I substitute these equations into a Matrix, so that I can solve for the forces, using the form of&lt;br&gt;
&lt;br&gt;
AX = B&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
Any help will be appreciated. Thanks.&lt;br&gt;
&lt;br&gt;
Damien</description>
    </item>
    <item>
      <pubDate>Thu, 09 Oct 2008 16:46:20 -0400</pubDate>
      <title>Re: Linear Simlutaneous Equations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237214#604476</link>
      <author>Freelance Embedded Systems Engineer</author>
      <description>Damien wrote:&lt;br&gt;
&amp;gt; Hi all, I have the following six equations: &lt;br&gt;
&amp;gt; 1. Reaction-Y1 + Force13*sin(A1) + Force12*sin(A3) = 0&lt;br&gt;
&amp;gt; 2. Reaction-X1 + Force13*cos(A1) + Force12*cos(A3) = 0&lt;br&gt;
&amp;gt; 3. Reaction-Y2 + Force21*sin(A1) + Force23*sin(A2) = 0&lt;br&gt;
&amp;gt; 4. Reaction-X2 + Force21*cos(A1) + Force23*cos(A2) = 0&lt;br&gt;
&amp;gt; 5. Reaction-Y3 + Force31*sin(A2) + Force32*sin(A3) = 0&lt;br&gt;
&amp;gt; 6. Reaction-X3 + Force31*cos(A2) + Force32*cos(A3) = 0&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have calculated the Reaction values for all 6 of them, and all the&lt;br&gt;
&amp;gt; angles of each of them. How would I substitute these equations into a&lt;br&gt;
&amp;gt; Matrix, so that I can solve for the forces, using the form of&lt;br&gt;
&amp;gt; AX = B&lt;br&gt;
&amp;gt; Where A is a square matrix, X is a vector of unknowns (Forces) and B&lt;br&gt;
&amp;gt; is a vector of knowns, i.e, the Reactions forces.&lt;br&gt;
&amp;gt; Any help will be appreciated. Thanks. Damien&lt;br&gt;
&lt;br&gt;
Just rewrite is as a matrix/vector equation the same way that you stated it.&lt;br&gt;
&lt;br&gt;
[sin(A3) sin(A1)      0       0      0       0  ] [Force12]  [Reaction-Y1]&lt;br&gt;
[cos(A3) cos(A1)      0       0      0       0  ] [Force13]  [Reaction-X1]&lt;br&gt;
[     0       0  sin(A1) sin(A2)     0       0  ]*[Force21]= [Reaction-Y2]&lt;br&gt;
[     0       0  cos(A1) cos(A2)     0       0  ] [Force23]  [Reaction-X2]&lt;br&gt;
[     0       0       0       0 sin(A2) sin(A3) ] [Force31]  [Reaction-Y3]&lt;br&gt;
[     0       0       0       0 cos(A2) cos(A3) ] [Force32]  [Reaction-X3]&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[A]*[X] = [B]&lt;br&gt;
&lt;br&gt;
X = inv(A)*B if the inverse exists.&lt;br&gt;
Otherwise, using the pseudoinverse to give you a leastsquare solution.&lt;br&gt;
X = A\B&lt;br&gt;
&lt;br&gt;
Note the wrap-around pattern of A3-A1,A1-A2,A2-A3</description>
    </item>
    <item>
      <pubDate>Thu, 09 Oct 2008 19:08:02 -0400</pubDate>
      <title>Re: Linear Simlutaneous Equations</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237214#604510</link>
      <author>Bruno Luong</author>
      <description>Freelance Embedded Systems Engineer &amp;lt;g9u5dd43@yahoo.com&amp;gt; wrote in message &amp;lt;48EE355C.9000106@yahoo.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; X = inv(A)*B if the inverse exists.&lt;br&gt;
&lt;br&gt;
Better use this&lt;br&gt;
X = A \ B&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; Otherwise, using the pseudoinverse to give you a leastsquare solution.&lt;br&gt;
&amp;gt; X = A\B&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
No, use X = pinv(A)*B or better still X=lsqr(A,B)&lt;br&gt;
&lt;br&gt;
Example:&lt;br&gt;
&lt;br&gt;
A=[1 2; 2 4]&lt;br&gt;
B = [3; 6]&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; A\B&lt;br&gt;
Warning: Matrix is singular to working precision. &lt;br&gt;
&lt;br&gt;
ans =&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;NaN&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;NaN&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; pinv(A)*B % Use lsqr&lt;br&gt;
&lt;br&gt;
ans =&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.6000&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1.2000&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
  </channel>
</rss>

