imagemodel is used to reduce the number of variables in a problem by eliminating explicit equality constraints.

Syntax

[Freduced,objreduced,x,y] = imagemodel(F,obj)

Examples

Consider the following equality constrained SDP.

C = eye(2);
A1 = randn(2,2);A1 = A1*A1';
A2 = randn(2,2);A2 = A2*A2';
A3 = randn(2,2);A3 = A3*A3';
z = sdpvar(3,1);
obj = sum(z)
F = [C+A1*z(1)+A2*z(2)+A3*z(3) >= 0, z(1)+z(2)== 1];

A model without the explicit equality constraint is easily obtained.

[Fi,obji,x,y] = imagemodel(F,obj);

We solve the reduced problem, and recover the original variables

solvesdp(Fi,obji);
assign(x,double(y));

Note that this reduction is done automatically if you call solvesdp and use a solver that cannot handle equality constraints. Hence, there is typically no reason to use this command, unless some further manipulations are going to be performed.

Comment

Note that there is a function in the image processing toolbox that may infer with YALMIPs imagemodel command. To resolve this, simply remove the path to the image processing toolbox.

See also

solvesdp, dualize, sdpsettings