clean.m
来自「matlab波形优化算法经常要用到的matlab toolbox工具箱:yalm」· M 代码 · 共 19 行
M
19 行
function Z=clean(Z,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.1 2005/12/19 15:27:31 joloef Exp $
if nargin == 1
tol = 0;
end
basis_real = real(Z);
basis_imag = imag(Z);
basis_real(abs(basis_real)<tol) = 0;
basis_imag(abs(basis_imag)<tol) = 0;
Z = basis_real + sqrt(-1)*basis_imag;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?