Mercurial > hg > octave-lyh
changeset 10650:f0dc41c824ce
Replace calls to deprecated functions.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 24 May 2010 17:20:08 -0700 |
parents | 64472dd48517 |
children | 944b78191f03 |
files | scripts/ChangeLog scripts/general/private/__isequal__.m scripts/image/image.m scripts/statistics/base/ranks.m |
diffstat | 4 files changed, 8 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-05-24 Rik <octave@nomad.inbox5.com> + * general/private/__isequal__.m, image/image.m, + statistics/base/ranks.m: Replace calls to deprecated functions. + 2010-05-23 Rik <octave@nomad.inbox5.com> * image/imshow.m: Scale image point color according to colormap.
--- a/scripts/general/private/__isequal__.m +++ b/scripts/general/private/__isequal__.m @@ -143,20 +143,12 @@ else ## Check the numeric types. - if (issparse (x)) - f_x = spfind (x); - else - f_x = find (x); - endif + f_x = find (x); l_f_x = length (f_x); x = x(f_x); for argn = 1:l_v y = varargin{argn}; - if (issparse (y)) - f_y = spfind (y); - else - f_y = find (y); - endif + f_y = find (y); t = (l_f_x == length (f_y)) && all (f_x == f_y); if (!t)
--- a/scripts/image/image.m +++ b/scripts/image/image.m @@ -52,7 +52,7 @@ endfor if (nargin == 0 || firstnonnumeric == 1) - img = loadimage ("default.img"); + img = imread ("default.img"); x = y = []; elseif (nargin == 1 || firstnonnumeric == 2) img = varargin{1};
--- a/scripts/statistics/base/ranks.m +++ b/scripts/statistics/base/ranks.m @@ -73,7 +73,7 @@ if (isempty (eq_el)) [eq_el, y] = sort (xi); else - runs = complement (eq_el+1, eq_el); + runs = setdiff (eq_el, eq_el+1); len = diff (find (diff ([Inf; eq_el; -Inf]) != 1)) + 1; [eq_el, y] = sort (xi); for i = 1 : length(runs)