changeset 11165:5962c1cfdbcb

Deprecate autocor and autocov functions.
author Rik <octave@nomad.inbox5.com>
date Thu, 28 Oct 2010 18:18:19 -0700
parents 254a87b40f60
children 9cdf43d1fa16
files ChangeLog NEWS scripts/ChangeLog scripts/deprecated/autocor.m scripts/deprecated/autocov.m scripts/deprecated/module.mk scripts/signal/autocor.m scripts/signal/autocov.m scripts/signal/module.mk
diffstat 7 files changed, 34 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-28  Rik  <octave@nomad.inbox5.com>
+
+	* NEWS: Update deprecated function list with autocov and autocor.
+
 2010-10-25  Kai Habel  <kai.habel@gmx.de>
 
 	* NEWS: Add uimenu.
--- a/NEWS
+++ b/NEWS
@@ -408,7 +408,7 @@
     release after 3.4):
 
       cellidx      fstat        values       gammai
-      betai        is_global
+      betai        is_global    autocor      autocov
 
 Summary of important user-visible changes for version 3.2:
 ---------------------------------------------------------
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-28  Rik  <octave@nomad.inbox5.com>
+
+	* deprecated/module.mk, signal/module.mk, deprecated/autocov.m,
+	  deprecated/autocor.m: Deprecate autocov and autocor functions.
+
 2010-10-27  David Bateman  <dbateman@free.fr>
 
 	* plot/__go_draw_axes__.m: Don't attempt to plot patch outlines if
rename from scripts/signal/autocor.m
rename to scripts/deprecated/autocor.m
--- a/scripts/signal/autocor.m
+++ b/scripts/deprecated/autocor.m
@@ -23,13 +23,25 @@
 ## If @var{h} is omitted, all autocorrelations are computed.
 ## If @var{x} is a matrix, the autocorrelations of each column are
 ## computed.
+## The particular algorithm used is from the field of statistics and 
+## differs from the definition used in signal processing.
 ## @end deftypefn
 
 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at>
 ## Description: Compute autocorrelations
 
+## Deprecated in version 3.4
+
 function retval = autocor (X, h)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "autocor is obsolete and will be removed from a future version of Octave; See the Octave-Forge signal package and the function xcor for a replacement");
+  endif
+
+
   if (nargin == 1)
     retval = autocov (X);
   elseif (nargin == 2)
rename from scripts/signal/autocov.m
rename to scripts/deprecated/autocov.m
--- a/scripts/signal/autocov.m
+++ b/scripts/deprecated/autocov.m
@@ -23,12 +23,22 @@
 ## If @var{h} is omitted, all autocovariances are computed.
 ## If @var{x} is a matrix, the autocovariances of each column are
 ## computed.
+## The particular algorithm used is from the field of statistics and 
+## differs from the definition used in signal processing.
 ## @end deftypefn
 
 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at>
 ## Description: Compute autocovariances
 
+## Deprecated in version 3.4
+
 function retval = autocov (X, h)
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "autocov is obsolete and will be removed from a future version of Octave; See the Octave-Forge signal package and the function xcov for a replacement");
+  endif
 
   [n, c] = size (X);
 
--- a/scripts/deprecated/module.mk
+++ b/scripts/deprecated/module.mk
@@ -1,6 +1,8 @@
 FCN_FILE_DIRS += deprecated
 
 deprecated_FCN_FILES = \
+  deprecated/autocor.m \
+  deprecated/autocov.m \
   deprecated/betai.m \
   deprecated/cellidx.m \
   deprecated/clg.m \
--- a/scripts/signal/module.mk
+++ b/scripts/signal/module.mk
@@ -5,8 +5,6 @@
   signal/arch_rnd.m \
   signal/arch_test.m \
   signal/arma_rnd.m \
-  signal/autocor.m \
-  signal/autocov.m \
   signal/autoreg_matrix.m \
   signal/bartlett.m \
   signal/blackman.m \