About the error "Error using symengine (line 59) Code generation failed due to an unexpected object of type 'RootOf'."

6 views (last 30 days)
I have no idea what the previous error means.
Error using symengine (line 59)
Code generation failed due to an unexpected object of type 'RootOf'.
I obtained when I programmed a little function to find values of x and y of the following form
function igriega = fig2(equis,p)
syms x y
b=sym(solve((1/(x-y)^2)-(1/y^2)==p,y));
c=matlabFunction(b);
igriega=c(equis);
I should mention that the previous function igriega works just fine whenever b is substituted for b=sym(solve((1/(x-y)^2)-(1/y^2)==p,y)), i.e. just taking the squares out.
My guess is that the problem has to do with the symbolic solution for the new function, but my attempts to fix it have failed.
Suggestions are warmly welcomed.

Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!