?? clean.m
字號:
function Z=clean(X,tol)
%CLEAN Remove terms with small coefficients
%
% Z = clean(X,tol) removes all variables with a coefficient smaller than tol
%
%
% Author Johan L鰂berg
% $Id: clean.m,v 1.7 2005/02/20 17:04:27 johanl Exp $
if nargin==1
temp = any(X.basis,1);
%temp(1)=[]; Does not work on 5.3.1
temp = temp(2:end);
index = find(temp);
else
X.basis(abs(X.basis)<tol)=0;
index = find(any(abs(X.basis(:,2:end))>tol,1));
end
if ~isempty(index)
Z = X;
if length(index)~=length(Z.lmi_variables)
Z.basis = Z.basis(:,[1 1+index]);
Z.lmi_variables = Z.lmi_variables(index);
end
else
Z = full(reshape(X.basis(:,1),X.n,X.m));
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -