Dynamic-Calibration/utils/YALMIP-master/@sdpvar/clear_poly_dep.m

20 lines
258 B
Matlab
Executable File

function P = clear_poly_dep(P,x,order)
mt = yalmip('monomtable');
xv = getvariables(x);
pv = getvariables(P);
mt = mt(pv,:);
polys = find(sum(mt(:,xv),2) > order);
if ~isempty(polys)
P.lmi_variables(polys) = [];
P.basis(:,1+polys) = [];
end