symbolic solve gives a weird result
3 views (last 30 days)
Show older comments
%%% This seems to be a legitimate bug. Developemnt team is further investigating the issue.
Can someone help figure out what's going on? I am using 2015a.
The following two systems should give the same set of solutions for x.
syms x y
x_sol1=solve(1.01/5*x^5-1,x);
double(x_sol1)
[x_sol,y_sol]=solve([ 1.01 - x*y, 5/x^6 - y],[x,y]);
double([x_sol y_sol])
What I got is as follows. None of them coincides. It makes me crazy.
ans =
1.3770 + 0.0000i
0.4255 - 1.3096i
0.4255 + 1.3096i
-1.1140 + 0.8094i
-1.1140 - 0.8094i
ans =
0.8602 - 0.6250i 0.7684 + 0.5583i
-1.0633 + 0.0000i -0.9499 - 0.0000i
-0.3286 + 1.0113i -0.2935 - 0.9034i
0.8602 + 0.6250i 0.7684 - 0.5583i
-0.3286 - 1.0113i -0.2935 + 0.9034i
0 Comments
Answers (1)
Walter Roberson
on 9 Mar 2016
solve() does not accept vectors of equations or vectors of variables to solve for. Each one needs to be a distinct argument.
[x_sol, y_sol] = solve( 1.01 - x*y, 5/x^6 - y, x, y);
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!