<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/293282</link>
    <title>MATLAB Central Newsreader - solve</title>
    <description>Feed for thread: solve</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2013 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.fr/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 06 Oct 2010 23:22:21 +0000</pubDate>
      <title>solve</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/293282#785754</link>
      <author>sonia </author>
      <description>Hello,&lt;br&gt;
I just want to solve an eqation, and I want to have the results as function  of z0 and z1.&lt;br&gt;
&lt;br&gt;
clear all; clc; clf; hold off;&lt;br&gt;
%Y=z2.^4+(-23/2)*z1^2.*z2.^2-13*z0^2*z1.*z2+C;%% the eqation to solve &lt;br&gt;
syms z0 z1 z2;&lt;br&gt;
% z0=300e-3;&lt;br&gt;
% z1=700e-3;&lt;br&gt;
solve(z2.^4+(-23/2)*z1^2.*z2.^2-13*z0^2*z1.*z2+(16*z1^2-43*z1^4*z0^2-148*z0^4*z1^2-192*z0^6)/(16*(z0^2+z1^2)),z2)&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Please help me to find the results as function of z0 and z1.&lt;br&gt;
&lt;br&gt;
Thanks &lt;br&gt;
Sonia</description>
    </item>
    <item>
      <pubDate>Wed, 06 Oct 2010 23:56:20 +0000</pubDate>
      <title>Re: solve</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/293282#785759</link>
      <author>Roger Stafford</author>
      <description>"sonia " &amp;lt;sonia_elwardi@yahoo.fr&amp;gt; wrote in message &amp;lt;i8j0bd$6r$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; I just want to solve an eqation, and I want to have the results as function  of z0 and z1.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; clear all; clc; clf; hold off;&lt;br&gt;
&amp;gt; %Y=z2.^4+(-23/2)*z1^2.*z2.^2-13*z0^2*z1.*z2+C;%% the eqation to solve &lt;br&gt;
&amp;gt; syms z0 z1 z2;&lt;br&gt;
&amp;gt; % z0=300e-3;&lt;br&gt;
&amp;gt; % z1=700e-3;&lt;br&gt;
&amp;gt; solve(z2.^4+(-23/2)*z1^2.*z2.^2-13*z0^2*z1.*z2+(16*z1^2-43*z1^4*z0^2-148*z0^4*z1^2-192*z0^6)/(16*(z0^2+z1^2)),z2)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Please help me to find the results as function of z0 and z1.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks &lt;br&gt;
&amp;gt; Sonia&lt;br&gt;
- - - - - - - - -&lt;br&gt;
&amp;nbsp;&amp;nbsp;There does exist a closed-form solution for the general quartic equation, but it is rather messy and I doubt if you would like dealing with it.  My own 'solve' function even refuses to give it.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;If yours doesn't work or is unsuitable, the next best thing you can do is write a function that has z0 and z1 as inputs and uses the 'roots' function to solve your equation for each set of inputs.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;However, the problem with either method is that quartic equations will in general have four roots, and some of these may be complex-valued, so it cannot constitute a single-valued function of your inputs.  With real-valued coefficients you will get either four real roots, two real and two complex, or all four complex.&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
  </channel>
</rss>
