Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
|
Re: Error using the 'solve' function
Posted:
Dec 27, 2013 2:11 PM
|
|
On 12/27/2013 1:26 PM, Gara wrote: > I'm trying to solve an equation but Matlab is giving me this error > message: > Warning: Explicit solution could not be found. >> In solve at 81 > In gara at 3 > > I don't understand it and I don't know how to fix it > > syms D > eqn=('(D^3)=((16)/(pi*190*((1-(D/58))^4)))*(sqrt((399.64^2)+(379.33^2)))'); > > A=solve(eqn, D); > > Please help me, thank you
"D" is used as a differential operator, so perhaps it is not a good idea to use it as a variable. Also, when you use a string expression for an equation, I believe that the symbolic variable is not used. So I ran the following slightly different commands:
syms D1 % D1 not D eqn=((D1^3)-((16)/(pi*190*((1-(D1/58))^4)))*(sqrt((399.64^2)+(379.33^2)))); % I replaced the = with a - A=solve(eqn, D1) % worked just fine
A =
63.079867300777110575867980436609 2.6087921602200828588643773225601 52.14008016362740012559841123103 - 1.2823774635012483818192063508194 - 2.0063893969527284824291415300245*i 58.36800765118895160165382185572 + 5.3548966432721055265970412913235*i 58.36800765118895160165382185572 - 5.3548966432721055265970412913235*i - 1.2823774635012483818192063508194 + 2.0063893969527284824291415300245*i
Alan Weiss MATLAB mathematical toolbox documentation
|
|
|
|