📄 supcon.m
字号:
function sc = supcon(P,M)% @MSDP/SUPCON - Measure support constraints of a moment SDP problem%% Given a moment SDP problem P (class MSDP) and a measure M (class MEAS)% previously defined by MDEF, the instruction%% SC = SUPCON(P,M)%% returns a column vector SC of class SUPCON corresponding% to localization constraints of measure M in P. Equality constraints% SC(K)==0 can be found at the top, and inequality constraints SC(K)>=0% at the bottom, in an order consistent with the cell array of dual% multipliers returned by function MSOL.% D. Henrion, 27 November 2006if nargin < 2 error('Unspecified measure')endif ~isa(P,'msdp') old = P; P = M; M = P;endif ~isa(P,'msdp') error('Unspecified moment SDP problem')endif length(P) > 1 error('First input argument must be a scalar')endif ~isa(M,'meas') error('Unspecified measure')endif length(M) > 1 error('Second input argument must be a scalar')endim = indmeas(M);sc = [];for k = 1:length(P.supceq) if indmeas(P.supceq(k)) == im sc = [sc; P.supceq(k)]; endendfor k = 1:length(P.supcge) if indmeas(P.supcge(k)) == im sc = [sc; P.supcge(k)]; endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -