Artifact e7ac91823e4f35b1845f7bdeff1e175218f96c146a429a7fb50c2a3006dc00b9:
- Executable file mtt/bin/trans/m/nozeros.m — part of check-in [af3953deae] at 2021-03-01 11:39:42 on branch master — Cleanup repository after cvs2git conversion. (user: jeff@gridfinity.com, size: 356) [annotate] [blame] [check-ins using] [more...]
- Executable file mttroot/mtt/bin/trans/m/nozeros.m — part of check-in [00739ea236] at 2000-03-29 11:52:56 on branch origin/master — Initial revision (user: gawthrop@users.sourceforge.net, size: 356) [annotate] [blame] [check-ins using]
function v = nozeros (v0,tol) ## usage: v = nozeros (v0,tol) ## ## Zaps the zeros in a vector with tolerance tol (defaults to zero) ## Copyright (C) 2000 by Peter J. Gawthrop if nargin<2 tol=eps; endif v = []; j=0; for i = 1:length(v0) if abs(v0(i))>tol j=j+1; v(1,j) = v0(i); end; end; endfunction