Question about vpasolve to solve a nonlinear equation with mutliple variables
Afficher commentaires plus anciens
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 commentaire
Walter Roberson
le 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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Numerical Integration and Differential Equations dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!