A matlab warning on solving equations

In summary, the matlab warning "Unable to solve equations" indicates that matlab was unable to find a solution to the set of equations provided. This can be caused by various factors such as incorrect input, insufficient information, or the equations themselves not having a solution. To fix this warning, one can check their input, try different methods or algorithms, or add more information or constraints to the equations. The warning is not always a problem and may just indicate that a solution was not found within a certain tolerance. It is possible to ignore the warning if the input and equations are reliable, but it is best to investigate to ensure accurate results. If matlab is unable to solve the equations, there are other tools and software available such as Mathematica, Maple
  • #1
mech-eng
828
13
Hi,
>> d = 'x^2 + 9*x –7 = 0';
>> solve(d)
Error using solve>processString (line 354)
' x^2 + 9*x –7 = 0 ' is not a valid expression or equation.

Error in solve>getEqns (line 284)
eqns = processString(eqns, v, vc);

Error in solve (line 160)
[eqns,vars,options] = getEqns(varargin{:});

I can not understand what is the problem here?
 
Physics news on Phys.org
  • #2
You aren't using the right syntax.
Code:
syms x
solve('x^2+9*x-7==0',x)
 
ans =
 
   109^(1/2)/2 - 9/2
 - 109^(1/2)/2 - 9/2

eval(ans)

ans =

    0.7202
   -9.7202
 

FAQ: A matlab warning on solving equations

1) What does the matlab warning "Unable to solve equations" mean?

This warning indicates that matlab was unable to find a solution to the set of equations provided. This could be due to a variety of reasons such as incorrect input, insufficient information, or the equations themselves may not have a solution.

2) How can I fix the matlab warning on solving equations?

There are a few potential solutions to this warning. First, check your input to ensure it is correct and complete. Next, try using different methods or algorithms for solving the equations. You can also try adding more information or constraints to the equations to help matlab find a solution.

3) Is the matlab warning on solving equations always a problem?

Not necessarily. In some cases, the warning may just indicate that matlab was unable to find a solution within a certain tolerance. This may still result in a valid solution, but it is important to double check the results and the equations to ensure they make sense.

4) Can I ignore the matlab warning on solving equations?

This depends on the specific situation. If you are confident in your input and the equations themselves, and the warning is not causing any major issues, then you may be able to ignore it. However, it is always best to investigate the warning to ensure the results are accurate.

5) Are there any other tools or software I can use to solve equations if matlab is unable to?

Yes, there are many other numerical computing software and tools available, such as Mathematica, Maple, or Python's SciPy library. Each may have different methods or algorithms for solving equations, so it may be worth trying a few different options if you encounter the matlab warning on solving equations.

Similar threads

Replies
5
Views
2K
Replies
10
Views
2K
Replies
11
Views
3K
Replies
3
Views
4K
Replies
4
Views
3K
Replies
1
Views
2K
Replies
2
Views
1K
Back
Top