Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Error using the 'solve' function
Replies: 2   Last Post: Dec 27, 2013 3:34 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alan Weiss

Posts: 1,264
Registered: 11/27/08
Re: Error using the 'solve' function
Posted: Dec 27, 2013 2:11 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.