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

6 次查看(过去 30 天)
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by