How to set initial guess for vpasolve in a system of equations?

13 views (last 30 days)
Hello, I have an equation system, and I am looking for variables x1 x2 x3 x4 x5. I get the good results except one variable, let it be x5. The exact solution is x5_numeric, and I get (-1)*x5_numeric from my code. I do not really know how to set initial guess or boundaries like [0 Inf] for vpasolve(), if I have an equation system, but only want to set boundaries for x5. Can you help me please?

Accepted Answer

Ameer Hamza
Ameer Hamza on 23 Nov 2020
See the init_param in vpasolve(). Since you want to specify a bound bound for only a single variable, you can do it like this
x0 = [nan nan; nan nan; nan nan; nan nan; 0 inf];
vpasolve(eqn, var, x0)

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!