http://www.mathworks.com/matlabcentral/newsreader/view_thread/282633
MATLAB Central Newsreader  equation solving
Feed for thread: equation solving
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Thu, 20 May 2010 07:38:06 +0000
equation solving
http://www.mathworks.com/matlabcentral/newsreader/view_thread/282633#747042
Vaibhav
I want to enter a equation of the form s^3+s^2+s^1+1<br>
But when I enter it gives an error message of unknown variable s.<br>
I need equation in this form only,since it is to be used further, for dividing another equation.<br>
Please help.

Thu, 20 May 2010 14:20:23 +0000
Re: equation solving
http://www.mathworks.com/matlabcentral/newsreader/view_thread/282633#747136
mat001
"Vaibhav " <vaibhav15211@gmail.com> wrote in message <ht2osu$9u4$1@fred.mathworks.com>...<br>
> I want to enter a equation of the form s^3+s^2+s^1+1<br>
> But when I enter it gives an error message of unknown variable s.<br>
> I need equation in this form only,since it is to be used further, for dividing another equation.<br>
> Please help.<br>
<br>
define s<br>
just like i did a small test to understand<br>
s = rand(1,100);<br>
t = s.^3+s.^2+s.^1+1

Thu, 20 May 2010 14:27:35 +0000
Re: equation solving
http://www.mathworks.com/matlabcentral/newsreader/view_thread/282633#747145
Walter Roberson
Vaibhav wrote:<br>
> I want to enter a equation of the form s^3+s^2+s^1+1<br>
> But when I enter it gives an error message of unknown variable s.<br>
> I need equation in this form only,since it is to be used further, for <br>
> dividing another equation.<br>
<br>
s^3+s^2+s^1+1 is an expression, not an equation. An equation would have <br>
to have an '=' in it somewhere.<br>
<br>
Symbolic expressions and functions and formula can only be represented <br>
in Matlab if you have the Symbolic Toolbox (which is part of the Student <br>
Edition.) If you do have the Symbolic Toolbox, see the documentation for <br>
sym()

Thu, 20 May 2010 14:43:05 +0000
Re: equation solving
http://www.mathworks.com/matlabcentral/newsreader/view_thread/282633#747158
Roger Stafford
"Vaibhav " <vaibhav15211@gmail.com> wrote in message <ht2osu$9u4$1@fred.mathworks.com>...<br>
> I want to enter a equation of the form s^3+s^2+s^1+1<br>
> But when I enter it gives an error message of unknown variable s.<br>
> I need equation in this form only,since it is to be used further, for dividing another equation.<br>
> Please help.<br>
<br>
Your system is not smart enough, unless you use the 'solve' function in the symbolic toolbox, to realize that with an s referenced by that equation, you are referring to any one of the three possible solutions to the equation: 1, i, i. Try using 'solve', or better still, 'roots' to see this.<br>
<br>
Be warned however that from polynomial degree five on, there is no general solution to such polynomial equations in terms that would permit you to give a straightforward expression for them.<br>
<br>
Roger Stafford

Thu, 20 May 2010 16:23:33 +0000
Re: equation solving
http://www.mathworks.com/matlabcentral/newsreader/view_thread/282633#747208
Steven Lord
<br>
"Vaibhav " <vaibhav15211@gmail.com> wrote in message <br>
news:ht2osu$9u4$1@fred.mathworks.com...<br>
>I want to enter a equation of the form s^3+s^2+s^1+1<br>
> But when I enter it gives an error message of unknown variable s.<br>
> I need equation in this form only,since it is to be used further, for <br>
> dividing another equation.<br>
> Please help.<br>
<br>
Use Symbolic Math Toolbox or enter the equation in a string and convert it <br>
into an anonymous function with STR2FUNC.<br>
<br>
 <br>
Steve Lord<br>
slord@mathworks.com<br>
comp.softsys.matlab (CSSM) FAQ: <a href="http://matlabwiki.mathworks.com/MATLAB_FAQ">http://matlabwiki.mathworks.com/MATLAB_FAQ</a><br>
To contact Technical Support use the Contact Us link on <br>
<a href="http://www.mathworks.com">http://www.mathworks.com</a>