Dynamic-Calibration/utils/YALMIP-master/extras/optimize.m

32 lines
983 B
Mathematica
Raw Normal View History

2019-12-18 11:25:45 +00:00
function varargout = optimize(varargin)
%OPTIMIZE Computes solution to optimization problem
%
% DIAGNOSTIC = OPTIMIZE(Constraint,Objective,options) is the common command to
% solve optimization problems of the following kind
%
% min Objective
% subject to
% Constraint
%
% NOTES
% To obtain solution for a variable, use VALUE.
% To obtain dual variable for a constraint, use DUAL.
% See YALMIPERROR for error codes returned in output.
%
% OUTPUT
% diagnostic : Diagnostic information
%
% INPUT
% Constraint : Object describing constraints. Can be [].
% Objective : Object describing the objective. Can be [].
% options : Options structure. See SDPSETTINGS. Can be [].
%
% EXAMPLE
% A = randn(15,5);b = rand(15,1)*5;c = randn(5,1);
% x = sdpvar(5,1);
% diagnostics = optimize(A*x<=b,c'*x);value(x)
%
% See also SDPVAR, @SDPVAR/VALUE, SDPSETTINGS, YALMIPERROR
[varargout{1:nargout}] = solvesdp(varargin{:});