?? 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 + -