Question about vpasolve to solve a nonlinear equation with mutliple variables
Show older comments
Hello everyone,
Recently I'm solving a nonlinear equation with mutliple variables. For example:
x=sym('a%d%d',[2,1]);
a=vpasolve(x.a11+tan(x.a12)==0,x,'random',true)
I know "vpasolve" can solve questions about multiple equations and variables. But I only have one equation, and the number of variables depends on the specific problem. So I want to find a more flexible codes. Brief, how can I solve a nonlinear equation with changeable number of variables?
Best,
Xiao
1 Comment
Walter Roberson
on 26 Sep 2018
eqn = x(1)+tan(x(2))==0
a = vpasolve(eqn, x,'random',true);
If eqn does not reference some of the variables in x, then those variables will end up with numeric values that could be just about anything.
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differential Equations 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!