# HG changeset patch # User Rik # Date 1288315099 25200 # Node ID 5962c1cfdbcbedf478dd579f2aef1c95dacfc582 # Parent 254a87b40f60334aef18f3b24b8dd3b5bc3f150a Deprecate autocor and autocov functions. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-10-28 Rik + + * NEWS: Update deprecated function list with autocov and autocor. + 2010-10-25 Kai Habel * NEWS: Add uimenu. diff --git a/NEWS b/NEWS --- 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: --------------------------------------------------------- diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-10-28 Rik + + * deprecated/module.mk, signal/module.mk, deprecated/autocov.m, + deprecated/autocor.m: Deprecate autocov and autocor functions. + 2010-10-27 David Bateman * plot/__go_draw_axes__.m: Don't attempt to plot patch outlines if diff --git a/scripts/signal/autocor.m b/scripts/deprecated/autocor.m 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 ## 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) diff --git a/scripts/signal/autocov.m b/scripts/deprecated/autocov.m 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 ## 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); diff --git a/scripts/deprecated/module.mk b/scripts/deprecated/module.mk --- 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 \ diff --git a/scripts/signal/module.mk b/scripts/signal/module.mk --- 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 \