# HG changeset patch # User Rik # Date 1310836979 25200 # Node ID 71265f725b11038904c813e9949903c866b4d0f1 # Parent 886256714823ecaa2d758068dbb201fb8b646c65 codesprint: Deprecate cut() function. * deprecated/module.mk, statistics/base/module.mk: Change Automake files to have cut.m in deprecated directory. diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -30,6 +30,7 @@ be removed from Octave 3.10 (or whatever version is the second major release after 3.6): + cut __error_text__ error_text is_duplicate_entry diff --git a/scripts/statistics/base/cut.m b/scripts/deprecated/cut.m rename from scripts/statistics/base/cut.m rename to scripts/deprecated/cut.m --- a/scripts/statistics/base/cut.m +++ b/scripts/deprecated/cut.m @@ -37,6 +37,13 @@ function group = cut (x, breaks) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "cut is obsolete and will be removed from a future version of Octave; please use histc instead"); + endif + if (nargin != 2) print_usage (); endif diff --git a/scripts/deprecated/module.mk b/scripts/deprecated/module.mk --- a/scripts/deprecated/module.mk +++ b/scripts/deprecated/module.mk @@ -7,6 +7,7 @@ deprecated/cellidx.m \ deprecated/clg.m \ deprecated/cquad.m \ + deprecated/cut.m \ deprecated/dispatch.m \ deprecated/fstat.m \ deprecated/gammai.m \ diff --git a/scripts/statistics/base/module.mk b/scripts/statistics/base/module.mk --- a/scripts/statistics/base/module.mk +++ b/scripts/statistics/base/module.mk @@ -6,7 +6,6 @@ statistics/base/cor.m \ statistics/base/corrcoef.m \ statistics/base/cov.m \ - statistics/base/cut.m \ statistics/base/gls.m \ statistics/base/histc.m \ statistics/base/iqr.m \