Functions > Solving and Optimization > Solve Block Functions > System of Equations Functions
System of Equations Functions
find(var1, var2, ...), minerr(var1, var2, ...)—Returns the values of var1, var2, ..., that satisfy the equations and inequalities in a solve block. If you are solving for n variables, the solve block must have n equations. Matrix notation is allowed, as is solving for matrix variables.
When there is only one unknown, the solution is a scalar. Otherwise the solution is a vector where the first element is var1, the second element is var2, and so on. If there are more than one unknown, the result is a vector of the solved variables. You cannot solve for a single element of a vector used in the solve block. PTC Mathcad adjusts all the unknown variables simultaneously to minimize the error.
Arguments
var1, var2,... are scalar or array variables found in the system of equations. Guess values for each variable must be defined above or within the body of the Solve Block. If solutions are expected to be complex, complex guess values must be used.
Additional Information
The find and minerr functions only work inside solve blocks.
When you use minerr in a solve block, you must validate the result.
Functions find and minerr use the Levenberg-Marquardt solving algorithm.
The find function chooses an appropriate method from a group of available methods, depending on whether the problem is linear or nonlinear, and other attributes.
Output of the find function may be assigned to a single variable, a vector of explicit variable names, or a function of other variable names within the solve block (including guess variables), parameterizing the solve block.
minerr differs from find or minimize in that, if the chosen algorithm fails to converge, whatever answer found on the last allowable iteration is returned, even if it doesn't meet the convergence criteria. If convergence occurs, then minerr returns the same results as find.
Legacy PTC Mathcad functions Find and Minerr are respectively interchangeable with find and minerr.
Inserting the lowercase functions from the Ribbon, or manually typing the lower/upper case versions, automatically assigns them the Keyword label.
If your system does not converge, and you would like to know the solution that was found, even though it did not meet the convergence criteria, use minerr.
The value of CTOL can affect the solution of nonlinear systems. If you set CTOL too small, the solver may not converge. To resolve this issue, try adjusting CTOL. You can also try using different guess values or adding an inequality constraint.
Was this helpful?