show(obj) displays information about
obj at the command line. If the object display is large, consider using
write instead to
output the display to a text file.
The show function returns information about problem-based objects at the command line. For example, examine the various stages of problem construction for optimizing the Rosenbrock function confined to the unit disk (see Solve a Constrained Nonlinear Problem, Problem-Based).
Create a 2-D optimization variable x. Show the variable.
x = optimvar('x',2);
show(x)
[ x(1) ]
[ x(2) ]
Create an expression for the objective function. Show the expression.
Solving problem using fmincon.
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions, to within the value of the optimality tolerance,
and constraints are satisfied to within the value of the constraint tolerance.
OptimizationVariable — show(obj) displays the
optimization variables. This display does not indicate variable type or bounds, it
shows only the variable dimensions and index names (if any).
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.