Using symbolic solve in matlab, won't execute inside a function I call

2 次查看(过去 30 天)
Basically, I run some code, I call a function and in that function I declare symbolic variables and use the solve command in MATLAB. It gives the following error:
??? Error using ==> mupadmex mupadmex requires one string argument.
Error in ==> mupadengine.mupadengine>mupadengine.evalin at 115 [result,status] = mupadmex(statement,8);
Error in ==> solve at 99 [t,stat] = evalin(symengine,vc,'char');
Error in ==> my_flow_convps_C at 190 answer=solve(u+1,v-1);
However, when I used the same code in the command window, it works.
Just for the record u+1,v-1 isn't what Im actually solving, it was me trying to debug.
Thanks,
Chris

回答(1 个)

Walter Roberson
Walter Roberson 2011-6-29
Try adding the name(s) of the variable you want to solve for, such as
solve(u+1,v-1,'u','v')

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by