comparison scripts/statistics/base/ranks.m @ 10540:952d4df5b686

Eliminate NaN*ones and Inf*ones constructs and just use Nan() and Inf()
author Rik <code@nomad.inbox5.com>
date Thu, 22 Apr 2010 14:03:47 -0700
parents 1bf0ce0930be
children 95c3e38098bf
comparison
equal deleted inserted replaced
10539:8db807a0eb78 10540:952d4df5b686
65 perm(1) = dim; 65 perm(1) = dim;
66 perm(dim) = 1; 66 perm(dim) = 1;
67 x = permute (x, perm); 67 x = permute (x, perm);
68 endif 68 endif
69 sz = size (x); 69 sz = size (x);
70 infvec = -Inf * ones ([1, sz(2 : end)]); 70 infvec = -Inf ([1, sz(2 : end)]);
71 [xs, xi] = sort (x); 71 [xs, xi] = sort (x);
72 eq_el = find (diff ([xs; infvec]) == 0); 72 eq_el = find (diff ([xs; infvec]) == 0);
73 if (isempty (eq_el)) 73 if (isempty (eq_el))
74 [eq_el, y] = sort (xi); 74 [eq_el, y] = sort (xi);
75 else 75 else