EquationProblem
System of nonlinear equations
Description
Specify a system of equations using optimization variables, and solve the system
using solve
.
Tip
For the full workflow, see Problem-Based Workflow for Solving Equations.
Creation
Create an EquationProblem
object by using the eqnproblem
function. Add equations to the problem by creating OptimizationEquality
objects and setting them as Equations
properties of the
EquationProblem
object.
prob = eqnproblem;
x = optimvar('x');
eqn = x^5 - x^4 + 3*x == 1/2;
prob.Equations.eqn = eqn;
Warning
The problem-based approach does not support complex values in the following: an objective function, nonlinear equalities, and nonlinear inequalities. If a function calculation has a complex value, even as an intermediate value, the final result might be incorrect.
Properties
Object Functions
evaluate | Evaluate optimization expression or objectives and constraints in problem |
issatisfied | Constraint satisfaction of an optimization problem at a set of points |
optimoptions | Create optimization options |
prob2struct | Convert optimization problem or equation problem to solver form |
show | Display information about optimization object |
solve | Solve optimization problem or equation problem |
solvers | Determine default and valid solvers for optimization problem or equation problem |
varindex | Map problem variables to solver-based variable index |
write | Save optimization object description |