


YALMIP2BMI reads the output of YALMIP "export" command and
converts it into a structure accepted by
PenLab via BMI or PMI modules, for details see manual or
modules/BMI/bmi_define.m.
See also pen2bmi, ex_yalmip, bmi_define
Example of using YALMIP2BMI:
%YALMIP commands
A = [-1 2;-3 -4]; B=-[1;1];
P = sdpvar(2,2); K = sdpvar(1,2);
F = [(A+B*K)'*P+P*(A+B*K) < -eye(2); P>eye(2)]
yalpen=export(F,trace(P),sdpsettings('solver','penbmi'),[],[],1);
%PENLAB commands
bmi=yalmip2bmi(yalpen);
penm = bmi_define(bmi);
prob = penlab(penm);
solve(prob);

0001 function [bmidata]=yalmip2bmi(yalpen, name) 0002 % YALMIP2BMI reads the output of YALMIP "export" command and 0003 % converts it into a structure accepted by 0004 % PenLab via BMI or PMI modules, for details see manual or 0005 % modules/BMI/bmi_define.m. 0006 % 0007 % See also pen2bmi, ex_yalmip, bmi_define 0008 % 0009 % Example of using YALMIP2BMI: 0010 % %YALMIP commands 0011 % A = [-1 2;-3 -4]; B=-[1;1]; 0012 % P = sdpvar(2,2); K = sdpvar(1,2); 0013 % F = [(A+B*K)'*P+P*(A+B*K) < -eye(2); P>eye(2)] 0014 % yalpen=export(F,trace(P),sdpsettings('solver','penbmi'),[],[],1); 0015 % %PENLAB commands 0016 % bmi=yalmip2bmi(yalpen); 0017 % penm = bmi_define(bmi); 0018 % prob = penlab(penm); 0019 % solve(prob); 0020 0021 % This file is a part of PENLAB package distributed under GPLv3 license 0022 % Copyright (c) 2013 by J. Fiala, M. Kocvara, M. Stingl 0023 % Last Modified: 27 Nov 2013 0024 0025 0026 0027 if (nargin<=1) 0028 name='BMI2 from convertor pen2bmi2()'; 0029 end 0030 0031 bmidata=pen2bmi(yalpen.penstruct, name);