source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/clean.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 418 bytes
Line 
1function Z=clean(Z,tol)
2%CLEAN Remove terms with small coefficients
3%
4% Z = clean(X,tol) removes all variables with a coefficient smaller than tol
5%
6%
7
8% Author Johan Löfberg
9% $Id: clean.m,v 1.1 2005/12/19 15:27:31 joloef Exp $
10
11if nargin == 1
12    tol = 0;
13end
14basis_real = real(Z);
15basis_imag = imag(Z);
16basis_real(abs(basis_real)<tol) = 0;
17basis_imag(abs(basis_imag)<tol) = 0;
18Z = basis_real + sqrt(-1)*basis_imag;
Note: See TracBrowser for help on using the repository browser.