From: Vaibhav on 20 May 2010 03:38 I want to enter a equation of the form s^3+s^2+s^1+1 But when I enter it gives an error message of unknown variable s. I need equation in this form only,since it is to be used further, for dividing another equation. Please help.
From: mat001 on 20 May 2010 10:20 "Vaibhav " <vaibhav15211(a)gmail.com> wrote in message <ht2osu$9u4$1(a)fred.mathworks.com>... > I want to enter a equation of the form s^3+s^2+s^1+1 > But when I enter it gives an error message of unknown variable s. > I need equation in this form only,since it is to be used further, for dividing another equation. > Please help. define s just like i did a small test to understand s = rand(1,100); t = s.^3+s.^2+s.^1+1
From: Walter Roberson on 20 May 2010 10:27 Vaibhav wrote: > I want to enter a equation of the form s^3+s^2+s^1+1 > But when I enter it gives an error message of unknown variable s. > I need equation in this form only,since it is to be used further, for > dividing another equation. s^3+s^2+s^1+1 is an expression, not an equation. An equation would have to have an '=' in it somewhere. Symbolic expressions and functions and formula can only be represented in Matlab if you have the Symbolic Toolbox (which is part of the Student Edition.) If you do have the Symbolic Toolbox, see the documentation for sym()
From: Roger Stafford on 20 May 2010 10:43 "Vaibhav " <vaibhav15211(a)gmail.com> wrote in message <ht2osu$9u4$1(a)fred.mathworks.com>... > I want to enter a equation of the form s^3+s^2+s^1+1 > But when I enter it gives an error message of unknown variable s. > I need equation in this form only,since it is to be used further, for dividing another equation. > Please help. 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. 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. Roger Stafford
From: Steven Lord on 20 May 2010 12:23 "Vaibhav " <vaibhav15211(a)gmail.com> wrote in message news:ht2osu$9u4$1(a)fred.mathworks.com... >I want to enter a equation of the form s^3+s^2+s^1+1 > But when I enter it gives an error message of unknown variable s. > I need equation in this form only,since it is to be used further, for > dividing another equation. > Please help. Use Symbolic Math Toolbox or enter the equation in a string and convert it into an anonymous function with STR2FUNC. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
Pages: 1 Prev: Simulink Bug in setting the Data Output Type of a Block Next: Ode23 returning a NaN answer |