export is used to export YALMIP models to various other numerical solver formats.
Consider a Lyapunov stability problem
P = sdpvar(5,5);
F = [A'*P+P*A <= 0, P >= eye(5)];
obj = trace(P);
A: [50x15 double]
b: [15x1 double]
C: [50x1 double]
K: [1x1 struct]
pars: [1x1 struct]
The data in recoverymodel can be used to relate a solution obtained from using the exported model, to the actual variables in YALMIP.
Some solvers do not support equality constraints. One way to handle this in YALMIP is to use sdpsettings('remove',1). If this is done, YALMIP derives a basis and solves the problem in the reduced variables. This basis is communicated through the structure recoverymodel.
[model,recoverymodel] = export([F, trace(P)==10],obj,ops);
[x,y] = sedumi(model.A,model.b,model.C,model.K);
z = recoverymodel.x_equ + recoverymodel.H*y;
If the compilation of the numerical model fails for some reason, then this will be reported in the third output diagnostic.
The general internal numerical solver-agnostic that YALMIP compiles is returned in the fourth output internalmodel