Mercurial > hg > octave-nkf
comparison scripts/statistics/base/values.m @ 8506:bc982528de11
comment style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 13 Jan 2009 11:56:00 -0500 |
parents | a1dbe9d80eee |
children | eb63fbe60fab |
comparison
equal
deleted
inserted
replaced
8505:124dd27bedae | 8506:bc982528de11 |
---|---|
38 if (! (isvector (x))) | 38 if (! (isvector (x))) |
39 error ("values: x must be a vector"); | 39 error ("values: x must be a vector"); |
40 endif | 40 endif |
41 | 41 |
42 i = any (isnan (x)); | 42 i = any (isnan (x)); |
43 x = x(find(!isnan (x))); # HACK! | 43 ## HACK! |
44 x = x(find(!isnan (x))); | |
44 n = length (x); | 45 n = length (x); |
45 x = reshape (x, n, 1); | 46 x = reshape (x, n, 1); |
46 s = sort (x); | 47 s = sort (x); |
47 v = s([1; (find (s(2:n) > s(1:n-1)) + 1)]); | 48 v = s([1; (find (s(2:n) > s(1:n-1)) + 1)]); |
48 if (i) | 49 if (i) |