<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240472</link>
    <title>MATLAB Central Newsreader - solve equation</title>
    <description>Feed for thread: solve equation</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, 04 Dec 2008 23:43:02 -0500</pubDate>
      <title>solve equation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240472#615153</link>
      <author>Song Joo </author>
      <description>Hi all,&lt;br&gt;
How could I solve these equations in matlab?&lt;br&gt;
&lt;br&gt;
a^2-(x3-x2)^2-(y3-y2)^2=0&lt;br&gt;
b^2-(x2-x1)^2-(y2-y1)^2=0&lt;br&gt;
&lt;br&gt;
a, b, x1,x3,y1, y3 are known. so basically i am looking for x2 and y2.&lt;br&gt;
solve command does not solve these equations. Does anybody know how to simply do this?&lt;br&gt;
&lt;br&gt;
Thanks in advance.</description>
    </item>
    <item>
      <pubDate>Fri, 05 Dec 2008 00:48:02 -0500</pubDate>
      <title>Re: solve equation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240472#615159</link>
      <author>Roger Stafford</author>
      <description>&quot;Song Joo &quot; &amp;lt;song-lee@northwestern.edu&amp;gt; wrote in message &amp;lt;gh9pu6$7ug$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt; How could I solve these equations in matlab?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; a^2-(x3-x2)^2-(y3-y2)^2=0&lt;br&gt;
&amp;gt; b^2-(x2-x1)^2-(y2-y1)^2=0&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; a, b, x1,x3,y1, y3 are known. so basically i am looking for x2 and y2.&lt;br&gt;
&amp;gt; solve command does not solve these equations. Does anybody know how to simply do this?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks in advance.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;I would have thought 'solve' could do that problem easily.  Did you specify which were to be regarded as the unknowns in your call to it?&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;It is also easy to solve it manually.  Just subtract one equation from the other, thereby eliminating the x2^2 and y2^2 terms, and leaving an expression that is linear in x2 and y2.  You can then solve for one of these in terms of the other.  Substituting it in one of the original equations will give a quadratic equation in a single unknown.  You will in general find two solutions for it.  Then use the above linear expression to find the other unknown.&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
    <item>
      <pubDate>Fri, 05 Dec 2008 01:24:01 -0500</pubDate>
      <title>Re: solve equation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240472#615165</link>
      <author>Song Joo </author>
      <description>I did this way&lt;br&gt;
[x2,y2]=solve('a^2-(x3-x2)^2-(y3-y2)^2=0',' b^2-(x2-x1)^2-(y2-y1)^2=0')&lt;br&gt;
and others are known. but when I excute this command, i don't get the results but just the equations as the output.  Other values are known but they varies so if this command works, I would want to keep this way. &lt;br&gt;
&lt;br&gt;
Would you recommend anything or did I do something wrong when I use solve command?&lt;br&gt;
&lt;br&gt;
Sincerely&lt;br&gt;
SongJoo&lt;br&gt;
&lt;br&gt;
&quot;Roger Stafford&quot; &amp;lt;ellieandrogerxyzzy@mindspring.com.invalid&amp;gt; wrote in message &amp;lt;gh9to2$lq4$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Song Joo &quot; &amp;lt;song-lee@northwestern.edu&amp;gt; wrote in message &amp;lt;gh9pu6$7ug$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi all,&lt;br&gt;
&amp;gt; &amp;gt; How could I solve these equations in matlab?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; a^2-(x3-x2)^2-(y3-y2)^2=0&lt;br&gt;
&amp;gt; &amp;gt; b^2-(x2-x1)^2-(y2-y1)^2=0&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; a, b, x1,x3,y1, y3 are known. so basically i am looking for x2 and y2.&lt;br&gt;
&amp;gt; &amp;gt; solve command does not solve these equations. Does anybody know how to simply do this?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks in advance.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   I would have thought 'solve' could do that problem easily.  Did you specify which were to be regarded as the unknowns in your call to it?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   It is also easy to solve it manually.  Just subtract one equation from the other, thereby eliminating the x2^2 and y2^2 terms, and leaving an expression that is linear in x2 and y2.  You can then solve for one of these in terms of the other.  Substituting it in one of the original equations will give a quadratic equation in a single unknown.  You will in general find two solutions for it.  Then use the above linear expression to find the other unknown.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Roger Stafford</description>
    </item>
    <item>
      <pubDate>Fri, 05 Dec 2008 01:42:02 -0500</pubDate>
      <title>Re: solve equation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240472#615167</link>
      <author>Roger Stafford</author>
      <description>&quot;Song Joo &quot; &amp;lt;song-lee@northwestern.edu&amp;gt; wrote in message &amp;lt;gh9vrh$jim$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I did this way&lt;br&gt;
&amp;gt; [x2,y2]=solve('a^2-(x3-x2)^2-(y3-y2)^2=0',' b^2-(x2-x1)^2-(y2-y1)^2=0')&lt;br&gt;
&amp;gt; and others are known. ........&lt;br&gt;
&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;You need to specify what your unknowns are in the 'solve' function.  It has no way of determining that 'x2' and 'y2' are to be regarded as the unknowns.  See the Matlab guide for the symbolic toolbox.&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
    <item>
      <pubDate>Fri, 05 Dec 2008 17:02:02 -0500</pubDate>
      <title>Re: solve equation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240472#615297</link>
      <author>Song Joo </author>
      <description>I ended up to go back to your other suggestion.-moreless manually solving with one unknown variable. The other question is this,&lt;br&gt;
Then the solution is,&lt;br&gt;
i*(((17*17797387353769591822856140666864759^(1/2))/4503599627370496000 - 1945982880988654689/22517998136852480000)^2 - 289/2500)^(1/2) + 7744119703248663/18014398509481984&lt;br&gt;
&amp;nbsp;7744119703248663/18014398509481984 - i*(((17*17797387353769591822856140666864759^(1/2))/4503599627370496000 - 1945982880988654689/22517998136852480000)^2 - 289/2500)^(1/2)&lt;br&gt;
&amp;nbsp;&lt;br&gt;
Which is supposed to be two simple values but i don't know why matlab format gives me these ridiculous numbers as solutions.&lt;br&gt;
&lt;br&gt;
When I recopy this value , then it will give me simple solutions as &lt;br&gt;
&lt;br&gt;
ans =&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.6716&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
ans =&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.1882&lt;br&gt;
&lt;br&gt;
Does anyone know matlab command to simply these complex formats? &lt;br&gt;
&lt;br&gt;
Thanks in advance,&lt;br&gt;
SongJoo&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Roger Stafford&quot; &amp;lt;ellieandrogerxyzzy@mindspring.com.invalid&amp;gt; wrote in message &amp;lt;gha0ta$9lg$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Song Joo &quot; &amp;lt;song-lee@northwestern.edu&amp;gt; wrote in message &amp;lt;gh9vrh$jim$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I did this way&lt;br&gt;
&amp;gt; &amp;gt; [x2,y2]=solve('a^2-(x3-x2)^2-(y3-y2)^2=0',' b^2-(x2-x1)^2-(y2-y1)^2=0')&lt;br&gt;
&amp;gt; &amp;gt; and others are known. ........&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt;   You need to specify what your unknowns are in the 'solve' function.  It has no way of determining that 'x2' and 'y2' are to be regarded as the unknowns.  See the Matlab guide for the symbolic toolbox.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Roger Stafford</description>
    </item>
    <item>
      <pubDate>Fri, 05 Dec 2008 17:16:02 -0500</pubDate>
      <title>Re: solve equation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240472#615302</link>
      <author>Joerg Buchholz</author>
      <description>&quot;Song Joo &quot; &amp;lt;song-lee@northwestern.edu&amp;gt; wrote in message &amp;lt;ghbmqa$491$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I ended up to go back to your other suggestion.-moreless manually solving with one unknown variable. The other question is this,&lt;br&gt;
&amp;gt; Then the solution is,&lt;br&gt;
&amp;gt; i*(((17*17797387353769591822856140666864759^(1/2))/4503599627370496000 - 1945982880988654689/22517998136852480000)^2 - 289/2500)^(1/2) + 7744119703248663/18014398509481984&lt;br&gt;
&amp;gt;  7744119703248663/18014398509481984 - i*(((17*17797387353769591822856140666864759^(1/2))/4503599627370496000 - 1945982880988654689/22517998136852480000)^2 - 289/2500)^(1/2)&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; Which is supposed to be two simple values but i don't know why matlab format gives me these ridiculous numbers as solutions.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; When I recopy this value , then it will give me simple solutions as &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ans =&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;     0.6716&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ans =&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;     0.1882&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Does anyone know matlab command to simply these complex formats? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks in advance,&lt;br&gt;
&amp;gt; SongJoo&lt;br&gt;
&lt;br&gt;
The 'double' command should do the job.</description>
    </item>
    <item>
      <pubDate>Fri, 05 Dec 2008 17:33:02 -0500</pubDate>
      <title>Re: solve equation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240472#615304</link>
      <author>Song Joo </author>
      <description>Thank you very much!&lt;br&gt;
&quot;Joerg Buchholz&quot; &amp;lt;buchholz@hs-bremen.de&amp;gt; wrote in message &amp;lt;ghbnki$h70$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Song Joo &quot; &amp;lt;song-lee@northwestern.edu&amp;gt; wrote in message &amp;lt;ghbmqa$491$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I ended up to go back to your other suggestion.-moreless manually solving with one unknown variable. The other question is this,&lt;br&gt;
&amp;gt; &amp;gt; Then the solution is,&lt;br&gt;
&amp;gt; &amp;gt; i*(((17*17797387353769591822856140666864759^(1/2))/4503599627370496000 - 1945982880988654689/22517998136852480000)^2 - 289/2500)^(1/2) + 7744119703248663/18014398509481984&lt;br&gt;
&amp;gt; &amp;gt;  7744119703248663/18014398509481984 - i*(((17*17797387353769591822856140666864759^(1/2))/4503599627370496000 - 1945982880988654689/22517998136852480000)^2 - 289/2500)^(1/2)&lt;br&gt;
&amp;gt; &amp;gt;  &lt;br&gt;
&amp;gt; &amp;gt; Which is supposed to be two simple values but i don't know why matlab format gives me these ridiculous numbers as solutions.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; When I recopy this value , then it will give me simple solutions as &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; ans =&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;     0.6716&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; ans =&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;     0.1882&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Does anyone know matlab command to simply these complex formats? &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks in advance,&lt;br&gt;
&amp;gt; &amp;gt; SongJoo&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The 'double' command should do the job.</description>
    </item>
  </channel>
</rss>

