Mercurial > hg > octave-lojdl
changeset 14354:55bb8c902a4d
maint: Remove deprecated functions from dev branch for next (3.8) release.
* NEWS: Update list of deprecated functions which had duplicates and missing functions
* deprecated/module.mk: Remove deprecated m-files from build system.
* autocor.m, autocov.m, betai.m, cellidx.m, clg.m, cquad.m, dispatch.m,
fstat.m, gammai.m, glpkmex.m, intwarning.m, is_duplicate_entry.m, is_global.m,
krylovb.m, perror.m, replot.m, saveimage.m, strerror.m, values.m, weibcdf.m,
weibinv.m, weibpdf.m, weibrnd.m: Remove deprecated functions from Mercurial.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 09 Feb 2012 13:16:39 -0800 |
parents | 937035390ec0 |
children | a6a5c5008e39 |
files | NEWS scripts/deprecated/autocor.m scripts/deprecated/autocov.m scripts/deprecated/betai.m scripts/deprecated/cellidx.m scripts/deprecated/clg.m scripts/deprecated/cquad.m scripts/deprecated/dispatch.m scripts/deprecated/fstat.m scripts/deprecated/gammai.m scripts/deprecated/glpkmex.m scripts/deprecated/intwarning.m scripts/deprecated/is_duplicate_entry.m scripts/deprecated/is_global.m scripts/deprecated/krylovb.m scripts/deprecated/module.mk scripts/deprecated/perror.m scripts/deprecated/replot.m scripts/deprecated/saveimage.m scripts/deprecated/strerror.m scripts/deprecated/values.m scripts/deprecated/weibcdf.m scripts/deprecated/weibinv.m scripts/deprecated/weibpdf.m scripts/deprecated/weibrnd.m |
diffstat | 25 files changed, 9 insertions(+), 1673 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS +++ b/NEWS @@ -12,11 +12,11 @@ The following functions were deprecated in Octave 3.4 and have been removed from Octave 3.8. - autocor dispatch is_global saveimage - autocov fstat krylovb strerror - betai gammai perror strerror - cellidx glpkmex perror values - cquad is_duplicate_entry replot + autocor dispatch is_global strerror + autocov fstat krylovb values + betai gammai perror + cellidx glpkmex replot + cquad is_duplicate_entry saveimage The following functions have been deprecated in Octave 3.8 and will be removed from Octave 3.12 (or whatever version is the second major @@ -738,9 +738,9 @@ be removed from Octave 3.8 (or whatever version is the second major release after 3.4): - autocor cellidx gammai krylovb saveimage - autocov dispatch glpkmex perror strerror - betai fstat is_global replot values + autocor cellidx gammai is_global replot values + autocov dispatch glpkmex krylovb saveimage + betai fstat intwarning perror strerror Summary of important user-visible changes for version 3.2: ---------------------------------------------------------
deleted file mode 100644 --- a/scripts/deprecated/autocor.m +++ /dev/null @@ -1,59 +0,0 @@ -## Copyright (C) 1995-2012 Friedrich Leisch -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} autocor (@var{x}, @var{h}) -## Return the autocorrelations from lag 0 to @var{h} of vector @var{x}. -## 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) - retval = autocov (X, h); - else - print_usage (); - endif - - if (min (retval (1,:)) != 0) - retval = retval ./ (ones (rows (retval), 1) * retval(1,:)); - endif - -endfunction - - -
deleted file mode 100644 --- a/scripts/deprecated/autocov.m +++ /dev/null @@ -1,62 +0,0 @@ -## Copyright (C) 1995-2012 Friedrich Leisch -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} autocov (@var{x}, @var{h}) -## Return the autocovariances from lag 0 to @var{h} of vector @var{x}. -## 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); - - if (isvector (X)) - n = length (X); - c = 1; - X = reshape (X, n, 1); - endif - - X = center (X); - - if (nargin == 1) - h = n - 1; - endif - - retval = zeros (h + 1, c); - - for i = 0 : h - retval(i+1, :) = diag (X(i+1:n, :).' * conj (X(1:n-i, :))).' / n; - endfor - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/betai.m +++ /dev/null @@ -1,47 +0,0 @@ -## Copyright (C) 1994-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} betai (@var{a}, @var{b}, @var{x}) -## This function is provided for compatibility with older versions of -## Octave. New programs should use betainc instead. -## -## @code{betai (@var{a}, @var{b}, @var{x})} is the same as -## @code{betainc (@var{x}, @var{a}, @var{b})}. -## @end deftypefn - -## Author: jwe -## Created: 30 Jan 1998 - -## Deprecated in version 3.4 - -function retval = betai (a, b, x) - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "betai is obsolete and will be removed from a future version of Octave; please use betainc instead"); - endif - - if (nargin == 3) - retval = betainc (x, a, b); - else - print_usage (); - endif - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/cellidx.m +++ /dev/null @@ -1,108 +0,0 @@ -## Copyright (C) 2000-2012 Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave program is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{idxvec}, @var{errmsg}] =} cellidx (@var{listvar}, @var{strlist}) -## Return indices of string entries in @var{listvar} that match strings -## in @var{strlist}. -## -## Both @var{listvar} and @var{strlist} may be passed as strings or -## string matrices. If they are passed as string matrices, each entry -## is processed by @code{deblank} prior to searching for the entries. -## -## The first output is the vector of indices in @var{listvar}. -## -## If @var{strlist} contains a string not in @var{listvar}, then -## an error message is returned in @var{errmsg}. If only one output -## argument is requested, then @var{cellidx} prints @var{errmsg} to the -## screen and exits with an error. -## @end deftypefn - -## deprecated in version 3.4 - -function [idxvec,errmsg] = cellidx (listvar, strlist) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "cellidx is obsolete and will be removed from a future version of Octave; use ismember instead"); - endif - - if (nargin != 2) - print_usage (); - endif - - if (ischar (strlist)) - tmp = strlist; - strlist = {}; - for kk = 1:rows(tmp) - strlist{kk} = deblank (tmp(kk,:)); - endfor - endif - - if (ischar (listvar)) - tmp = listvar; - listvar = {}; - for kk = 1:rows(tmp) - listvar{kk} = deblank (tmp(kk,:)); - endfor - endif - - ## initialize size of idxvec (for premature return) - idxvec = zeros (length(strlist), 1); - - errmsg = ""; - if (! iscellstr (listvar)) - errmsg = "listvar must be a list of strings"; - elseif (! iscellstr (strlist)) - errmsg = "strlist must be a list of strings"; - endif - - if (length (errmsg)) - if (nargout < 2) - error (errmsg); - else - return; - endif - endif - - nsigs = length(listvar); - for idx = 1:length(strlist) - signame = strlist{idx}; - for jdx = 1:nsigs - if (strcmp (signame, listvar{jdx})) - if (idxvec(idx) != 0) - warning ("Duplicate signal name %s (%d,%d)\n", - listvar{jdx}, jdx, idxvec(idx)); - else - idxvec(idx) = jdx; - endif - endif - endfor - if (idxvec(idx) == 0) - errmsg = sprintf ("Did not find %s", signame); - if (nargout == 1) - error (errmsg); - else - break; - endif - endif - endfor - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/clg.m +++ /dev/null @@ -1,40 +0,0 @@ -## Copyright (C) 2006-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} clg () -## This function has been deprecated. Use clf instead. -## @end deftypefn - -## Author: jwe - -## Deprecated in version 3.0 -## Matlab still has this function, so don't remove just yet. - -function clg () - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "clg is obsolete and will be removed from a future version of Octave, please use clf instead"); - endif - - clf (); - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/cquad.m +++ /dev/null @@ -1,39 +0,0 @@ -## Copyright (C) 2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{int}, @var{err}, @var{nr_points}] =} cquad (@var{f}, @var{a}, @var{b}, @var{tol}) -## @deftypefnx {Function File} {[@var{int}, @var{err}, @var{nr_points}] =} cquad (@var{f}, @var{a}, @var{b}, @var{tol}, @var{sing}) -## This function is an alias for compatibility with older versions of -## Octave. New programs should use @code{quadcc} instead. -## @seealso{quadcc} -## @end deftypefn - -## Deprecated in version 3.4 - -function retval = cquad (varargin) - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "cquad has been renamed to quadcc and this alias will be removed from a future version of Octave; please use quadcc instead"); - endif - - retval = quadcc (varargin{:}); - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/dispatch.m +++ /dev/null @@ -1,103 +0,0 @@ -## Copyright (C) 2010-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Loadable Function} {} dispatch (@var{f}, @var{r}, @var{type}) -## -## Replace the function @var{f} with a dispatch so that function @var{r} -## is called when @var{f} is called with the first argument of the named -## @var{type}. If the type is @var{any} then call @var{r} if no other type -## matches. The original function @var{f} is accessible using -## @code{builtin (@var{f}, @dots{})}. -## -## If @var{r} is omitted, clear dispatch function associated with @var{type}. -## -## If both @var{r} and @var{type} are omitted, list dispatch functions -## for @var{f}. -## @seealso{builtin} -## @end deftypefn - -## Deprecated in version 3.4 - -function varargout = dispatch (varargin) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "dispatch is obsolete and will be removed from a future version of Octave; please use classes instead"); - endif - - varargout = cell (nargout, 1); - [ varargout{:} ] = __dispatch__ (varargin{:}); - -endfunction - - -%!test # builtin function replacement -%! dispatch('sin','length','string') -%! assert(sin("abc"),3) -%! assert(sin(0),0,10*eps); - -%!test # 'any' function -%! dispatch('sin','exp','any') -%! assert(sin(0),1,eps); -%! assert(sin("abc"),3); - -%!test # 'builtin' function -%! assert(builtin('sin',0),0,eps); -%! builtin('eval','x=1;'); -%! assert(x,1); - -%!test # clear function mapping -%! dispatch('sin','string') -%! dispatch('sin','any') -%! assert(sin(0),0,10*eps); - -%!test # oct-file replacement -%! dispatch('fft','length','string') -%! assert(fft([1,1]),[2,0]); -%! assert(fft("abc"),3) -%! dispatch('fft','string'); - -%!test # m-file replacement -%! dispatch('hamming','length','string') -%! assert(hamming(1),1) -%! assert(hamming("abc"),3) -%! dispatch('hamming','string') - -%!test # override preloaded builtin -%! evalin('base','cos(1);'); -%! dispatch('cos','length','string') -%! evalin('base','assert(cos("abc"),3)'); -%! evalin('base','assert(cos(0),1,eps)'); -%! dispatch('cos','string') - -%!test # override pre-loaded oct-file -%! evalin('base','qr(1);'); -%! dispatch('qr','length','string') -%! evalin('base','assert(qr("abc"),3)'); -%! evalin('base','assert(qr(1),1)'); -%! dispatch('qr','string'); - -%!test # override pre-loaded m-file -%! evalin('base','hanning(1);'); -%! dispatch('hanning','length','string') -%! evalin('base','assert(hanning("abc"),3)'); -%! evalin('base','assert(hanning(1),1)'); -%! dispatch('hanning','string');
deleted file mode 100644 --- a/scripts/deprecated/fstat.m +++ /dev/null @@ -1,35 +0,0 @@ -## Copyright (C) 2010-2012 VZLU Prague -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{info}, @var{err}, @var{msg}] =} fstat (fid) -## This function has been deprecated. Use stat instead. -## @end deftypefn - -## Deprecated in version 3.4 - -function [info, err, msg] = fstat (fid) - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "fstat is obsolete and will be removed from a future version of Octave, please use stat instead"); - endif - - [info, err, msg] = stat (fid); -endfunction
deleted file mode 100644 --- a/scripts/deprecated/gammai.m +++ /dev/null @@ -1,47 +0,0 @@ -## Copyright (C) 1994-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} gammai (@var{a}, @var{x}) -## This function is provided for compatibility with older versions of -## Octave. New programs should use @code{gammainc} instead. -## -## @code{gammai (@var{a}, @var{x})} is the same as -## @code{gammainc (@var{x}, @var{a})}. -## @end deftypefn - -## Author: jwe -## Created: 30 Jan 1998 - -## Deprecated in version 3.4 - -function retval = gammai (a, x) - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "gammai is obsolete and will be removed from a future version of Octave; please use gammainc instead"); - endif - - if (nargin == 2) - retval = gammainc (x, a); - else - print_usage (); - endif - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/glpkmex.m +++ /dev/null @@ -1,117 +0,0 @@ -## Copyright (C) 2005-2012 Nicolo' Giorgetti -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{xopt}, @var{fmin}, @var{status}, @var{extra}] =} glpkmex (@var{sense}, @var{c}, @var{A}, @var{b}, @var{ctype}, @var{lb}, @var{ub}, @var{vartype}, @var{param}, @var{lpsolver}, @var{save_pb}) -## This function is provided for compatibility with the old @sc{matlab} -## interface to the GNU @sc{glpk} library. For Octave code, you should use -## the @code{glpk} function instead. -## @seealso{glpk} -## @end deftypefn - -function [xopt, fopt, status, extra] = glpkmex (varargin) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "glpkmex is obsolete and will be removed from a future version of Octave; please use glpk instead"); - endif - - ## If there is no input output the version and syntax - if (nargin < 4 || nargin > 11) - print_usage (); - return; - endif - - ## reorder args: - ## - ## glpkmex glpk - ## - ## 1 sense c - ## 2 c a - ## 3 a b - ## 4 b lb - ## 5 ctype ub - ## 6 lb ctype - ## 7 ub vartype - ## 8 vartype sense - ## 9 param param - ## 10 lpsolver - ## 11 savepb - - sense = varargin{1}; - c = varargin{2}; - a = varargin{3}; - b = varargin{4}; - - nx = length (c); - - if (nargin > 4) - ctype = varargin{5}; - else - ctype = repmat ("U", nx, 1); - endif - - if (nargin > 5) - lb = varargin{6}; - else - lb = repmat (-Inf, nx, 1); - endif - - if (nargin > 6) - ub = varargin{7}; - else - ub = repmat (Inf, nx, 1); - endif - - if (nargin > 7) - vartype = varargin{8}; - else - vartype = repmat ("C", nx, 1); - endif - - if (nargin > 8) - param = varargin{9}; - else - param = struct (); - endif - - if (nargin > 9 && ! isfield (param, "lpsolver")) - param.lpsolver = varargin{10}; - endif - - if (nargin > 10 && ! isfield (param, "save")) - param.save = varargin{11}; - endif - - if (nargout == 0) - glpk (c, a, b, lb, ub, ctype, vartype, sense, param); - elseif (nargout == 1) - xopt = glpk (c, a, b, lb, ub, ctype, vartype, sense, param); - elseif (nargout == 2) - [xopt, fopt] = glpk (c, a, b, lb, ub, ctype, vartype, sense, param); - elseif (nargout == 3) - [xopt, fopt, status] = ... - glpk (c, a, b, lb, ub, ctype, vartype, sense, param); - else - [xopt, fopt, status, extra] = ... - glpk (c, a, b, lb, ub, ctype, vartype, sense, param); - endif - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/intwarning.m +++ /dev/null @@ -1,133 +0,0 @@ -## Copyright (C) 2008-2012 David Bateman -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} intwarning (@var{action}) -## @deftypefnx {Function File} {} intwarning (@var{s}) -## @deftypefnx {Function File} {@var{s} =} intwarning (@dots{}) -## Control the state of the warning for integer conversions and math -## operations. -## -## @table @asis -## @item "query" -## With an output argument, return the current state of the integer -## conversion and math warnings. With no output arguments, print the -## current state. -## @c Set example in small font to prevent overfull line -## -## @smallexample -## @group -## intwarning ("query") -## The state of warning "Octave:int-convert-nan" is "off" -## The state of warning "Octave:int-convert-non-int-val" is "off" -## The state of warning "Octave:int-convert-overflow" is "off" -## The state of warning "Octave:int-math-overflow" is "off" -## @end group -## @end smallexample -## -## @item "on" -## @itemx "off" -## Turn integer conversion and math warnings on (or off). If there is -## no output argument, then nothing is printed. Otherwise the original -## state of the state of the integer conversion and math warnings is -## returned in a structure array. -## @end table -## -## The original state of the integer warnings can be restored by passing -## the structure array returned by @code{intwarning} to a later call to -## @code{intwarning}. For example: -## -## @example -## @group -## s = intwarning ("off"); -## @dots{} -## intwarning (s); -## @end group -## @end example -## @seealso{warning} -## @end deftypefn - -## Deprecated in v. 3.4 - -function y = intwarning (x) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "intwarning is obsolete and will be removed from a future version of Octave; integer math no longer produces warnings -- supply your own checks if you need those"); - endif - - return; - - if (nargin != 1) - print_usage (); - else - if (nargout > 0) - y = warning("query", "Octave:int-convert-nan"); - y = [y; warning("query", "Octave:int-convert-non-int-val")]; - y = [y; warning("query", "Octave:int-convert-overflow")]; - y = [y; warning("query", "Octave:int-math-overflow")]; - endif - if (ischar (x)) - if (strcmpi (x, "query")) - if (nargout == 0) - __print_int_warn_state__ ("Octave:int-convert-nan"); - __print_int_warn_state__ ("Octave:int-convert-non-int-val"); - __print_int_warn_state__ ("Octave:int-convert-overflow"); - __print_int_warn_state__ ("Octave:int-math-overflow"); - printf("\n"); - endif - elseif (strcmpi (x, "on")) - warning ("on", "Octave:int-convert-nan"); - warning ("on", "Octave:int-convert-non-int-val"); - warning ("on", "Octave:int-convert-overflow"); - warning ("on", "Octave:int-math-overflow"); - elseif (strcmpi (x, "off")) - warning ("off", "Octave:int-convert-nan"); - warning ("off", "Octave:int-convert-non-int-val"); - warning ("off", "Octave:int-convert-overflow"); - warning ("off", "Octave:int-math-overflow"); - else - error ("intwarning: unrecognized argument"); - endif - elseif (isstruct(x)) - for fld = fieldnames (x) - if (strcmp ("Octave:int-convert-nan") - || strcmp ("Octave:int-convert-non-int-val") - || strcmp ("Octave:int-convert-overflow") - || strcmp ("Octave:int-cmath-overflow")) - s = getfield (x, fld); - if (! ischar (s) || !(strcmpi("s","on") || strcmpi("s","off"))) - error ("intwarning: unexpected warning state"); - endif - warning (s, fld); - else - error ("intwarning: unrecognized integer warning %s", fld); - endif - endfor - else - error ("intwarning: unexpected input"); - endif - endif -endfunction - -function __print_int_warn_state__ (s) - fprintf ("The state of warning \"%s\" is \"%s\"\n", - s, warning ("query", s).state); -endfunction
deleted file mode 100644 --- a/scripts/deprecated/is_duplicate_entry.m +++ /dev/null @@ -1,53 +0,0 @@ -## Copyright (C) 1996-2012 A. S. Hodel -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} is_duplicate_entry (@var{x}) -## Return non-zero if any entries in @var{x} are duplicates of one -## another. -## @seealso{unique} -## @end deftypefn - -## Author: A. S. Hodel <scotte@eng.auburn.edu> - -function retval = is_duplicate_entry (x) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "is_duplicate_entry is obsolete and will be removed from a future version of Octave; see the function unique for equivalent functionality"); - endif - - - if (nargin == 1) - if (ismatrix (x)) - lx = numel (x); - lx1 = lx-1; - x = sort (reshape (x, 1, lx)); - dx = x(1:lx1) - x(2:lx); - retval = sum (dx == 0); - else - error ("is_duplicate_entry: expecting matrix argument"); - endif - else - print_usage (); - endif - -endfunction -
deleted file mode 100644 --- a/scripts/deprecated/is_global.m +++ /dev/null @@ -1,37 +0,0 @@ -## Copyright (C) 1994-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} is_global (@var{name}) -## This function is provided for compatibility with older versions of -## Octave. New programs should use isglobal instead. -## @end deftypefn - -## Deprecated in version 3.4 - -function retval = is_global (name) - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "is_global is obsolete and will be removed from a future version of Octave; please use isglobal instead"); - endif - - retval = isglobal(name); - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/krylovb.m +++ /dev/null @@ -1,46 +0,0 @@ -## Copyright (C) 1993-2012 A. Scottedward Hodel -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{u}, @var{ucols}] =} krylovb (@var{A}, @var{V}, @var{k}, @var{eps1}, @var{pflg}) -## See @code{krylov}. -## @end deftypefn - -## Deprecated in version 3.4 - -function [Uret, Ucols] = krylovb (A, V, k, eps1, pflg) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "krylovb is obsolete and will be removed from a future version of Octave; please use [Uret, ~, Ucols] = krylov (...) instead"); - endif - - switch (nargin) - case (3) - [Uret, H, Ucols] = krylov (A, V, k); - case (4) - [Uret, H, Ucols] = krylov (A, V, k, eps1); - case (5) - [Uret, H, Ucols] = krylov (A, V, k, eps1, pflg); - otherwise - print_usage (); - endswitch - -endfunction
--- a/scripts/deprecated/module.mk +++ b/scripts/deprecated/module.mk @@ -2,39 +2,16 @@ deprecated_FCN_FILES = \ deprecated/__error_text__.m \ - deprecated/autocor.m \ - deprecated/autocov.m \ - deprecated/betai.m \ - deprecated/cellidx.m \ - deprecated/clg.m \ deprecated/cor.m \ deprecated/corrcoef.m \ - deprecated/cquad.m \ deprecated/cut.m \ - deprecated/dispatch.m \ deprecated/error_text.m \ - deprecated/fstat.m \ - deprecated/gammai.m \ - deprecated/glpkmex.m \ - deprecated/intwarning.m \ - deprecated/is_duplicate_entry.m \ - deprecated/is_global.m \ deprecated/isstr.m \ - deprecated/krylovb.m \ - deprecated/perror.m \ deprecated/polyderiv.m \ - deprecated/replot.m \ - deprecated/saveimage.m \ deprecated/setstr.m \ deprecated/shell_cmd.m \ - deprecated/strerror.m \ deprecated/studentize.m \ - deprecated/sylvester_matrix.m \ - deprecated/values.m \ - deprecated/weibcdf.m \ - deprecated/weibinv.m \ - deprecated/weibpdf.m \ - deprecated/weibrnd.m + deprecated/sylvester_matrix.m FCN_FILES += $(deprecated_FCN_FILES)
deleted file mode 100644 --- a/scripts/deprecated/perror.m +++ /dev/null @@ -1,45 +0,0 @@ -## Copyright (C) 1993-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} perror (@var{funcname}, @var{num}) -## Print the error message for function @var{funcname} corresponding to the -## error number @var{num}. This function is intended to be used to print -## useful error messages for those functions that return numeric error -## codes. -## @seealso{strerror} -## @end deftypefn - -## Author: jwe - -function perror (funcname, num) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "perror is obsolete and will be removed from a future version of Octave."); - endif - - if (nargin != 2) - print_usage (); - else - printf (strerror (funcname, num)); - endif - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/replot.m +++ /dev/null @@ -1,43 +0,0 @@ -## Copyright (C) 2005-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} replot () -## Refresh the plot window. -## @end deftypefn - -## Author: jwe - -## Deprecated in version 3.4 - -function replot () - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "replot is obsolete and will be removed from a future version of Octave; please use refresh instead"); - endif - - if (nargin == 0) - drawnow (); - else - print_usage (); - endif - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/saveimage.m +++ /dev/null @@ -1,314 +0,0 @@ -## Copyright (C) 1994-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} saveimage (@var{fname}, @var{img}, @var{fmt}) -## @deftypefnx {Function File} {} saveimage (@var{fname}, @var{img}, @var{fmt}, @var{map}) -## Save the matrix @var{img} to file @var{fname} in image format @var{fmt}. -## Valid values for @var{fmt} are -## -## @table @asis -## @item "img" -## Octave's image format. The current colormap is also saved in the file. -## -## @item "ppm" -## Portable pixmap format. -## -## @item "ps" -## PostScript format. -## @end table -## -## If the fourth argument is supplied, the specified colormap will also be -## saved along with the image. -## -## Note: if the colormap contains only two entries and these entries are -## black and white, the bitmap ppm and PostScript formats are used. If the -## image is a gray scale image (the entries within each row of the colormap -## are equal) the gray scale ppm and PostScript image formats are used, -## otherwise the full color formats are used. -## @seealso{imread, save, load, colormap} -## @end deftypefn - -## The conversion to PostScript is based on pbmtolps.c, which was -## written by -## -## George Phillips <phillips@cs.ubc.ca> -## Department of Computer Science -## University of British Columbia -## -## and is part of the portable bitmap utilities, - -## Author: Tony Richardson <arichard@stark.cc.oh.us> -## Created: July 1994 -## Adapted-By: jwe - -## Rewritten by jwe to avoid using octoppm and pbm routines so that -## people who don't have the pbm stuff installed can still use this -## function. -## -## The conversion to PostScript is based on pnmtops.c, which is part of -## the portable bitmap utilties and bears this copyright notice: -## -## Copyright (C) 1989 by Jef Poskanzer. -## -## Permission to use, copy, modify, and distribute this software and its -## documentation for any purpose and without fee is hereby granted, provided -## that the above copyright notice appear in all copies and that both that -## copyright notice and this permission notice appear in supporting -## documentation. This software is provided "as is" without express or -## implied warranty. - -function saveimage (fname, img, fmt, map) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "saveimage is obsolete and will be removed from a future version of Octave; please use imwrite instead"); - endif - - if (nargin < 2 || nargin > 4) - print_usage (); - endif - - if (nargin < 4) - if (size(img, 3) == 3) - [img, map] = rgb2ind(img); - else - map = colormap (); - endif - endif - - [map_nr, map_nc] = size (map); - - if (map_nc != 3) - error ("saveimage: MAP must be an N x 3 matrix"); - endif - - if (nargin < 3) - fmt = "img"; - elseif (! ischar (fmt)) - error ("saveimage: FMT specification must be a string"); - elseif (! (strcmp (fmt, "img") - || strcmp (fmt, "ppm") - || strcmp (fmt, "ps"))) - error ("saveimage: unsupported image format specification"); - endif - - if (! ismatrix (img)) - warning ("IMG variable is not a matrix"); - endif - - if (! ischar (fname)) - error ("saveimage: FNAME must be a string"); - endif - - ## If we just want Octave image format, save and return. - - if (strcmp (fmt, "img")) - save ("-text", fname, "map", "img"); - return; - endif - - ## Convert to another format if requested. - - grey = all (map(:,1) == map(:,2) && map(:,1) == map (:,3)); - - pbm = pgm = ppm = 0; - - map_sz = map_nr * map_nc; - - map = reshape (map, map_sz, 1); - - map (map > 1) = 1; - map (map < 0) = 0; - - map = round (255 * map); - - bw = (map_nr == 2 - && ((map(1,1) == 0 && map(2,1) == 255) - || (map(1,1) == 255 && map(2,1) == 0))); - - img = round (img'); - [img_nr, img_nc] = size (img); - - img_sz = img_nr * img_nc; - img = reshape (img, img_sz, 1); - - img (img > map_nr) = map_nr; - img (img <= 0) = 1; - - if (strcmp (fmt, "ppm")) - - ## Would be nice to make this consistent with the line used by the - ## load/save functions, but we need a good way to get username and - ## hostname information. - - time_string = ctime (time ()); - time_string = time_string (1:length (time_string)-1); - tagline = sprintf ("# Created by Octave %s, %s", - OCTAVE_VERSION, time_string); - - if (grey && bw) - - if (map(1) != 0) - map = [0; 1]; - else - map = [1; 0]; - endif - - n_long = rem (img_nc, 8); - tmp = zeros (ceil (img_nc/8), img_nr); - - k = ceil (img_nr/8); - tmp = zeros (k, img_nc); - - ## Append columns with zeros to original image so that - ## mod (cols, 8) = 0. - - bwimg = postpad (reshape (map(img), img_nr, img_nc), k * 8, 0); - - b = kron (pow2 (7:-1:0)', ones (1, img_nc)); - - for i = 1:k - tmp(i,:) = sum (bwimg(8*(i-1)+1:8*i,:) .* b); - endfor - - fid = fopen (fname, "wb"); - fprintf (fid, "P4\n%s\n%d %d\n", tagline, img_nr, img_nc); - fwrite (fid, tmp, "uchar"); - fprintf (fid, "\n"); - fclose (fid); - - elseif (grey) - - fid = fopen (fname, "wb"); - fprintf (fid, "P5\n%s\n%d %d\n255\n", tagline, img_nr, img_nc); - fwrite (fid, map(img), "uchar"); - fprintf (fid, "\n"); - fclose (fid); - - else - - img_idx = ((1:3:3*img_sz)+2)'; - map_idx = ((2*map_nr+1):map_sz)'; - - tmap = map(map_idx); - tmp(img_idx--) = tmap(img); - - map_idx = map_idx - map_nr; - tmap = map(map_idx); - tmp(img_idx--) = tmap(img); - - map_idx = map_idx - map_nr; - tmap = map(map_idx); - tmp(img_idx--) = tmap(img); - - fid = fopen (fname, "wb"); - fprintf (fid, "P6\n%s\n%d %d\n255\n", tagline, img_nr, img_nc); - fwrite (fid, tmp, "uchar"); - fprintf (fid, "\n"); - fclose (fid); - - endif - - elseif (strcmp (fmt, "ps") == 1) - - if (! grey) - error ("saveimage: must have a greyscale colormap for conversion to PostScript"); - endif - - bps = 8; - dpi = 300; - pagewid = 612; - pagehgt = 762; - MARGIN = 0.95; - devpix = dpi / 72.0 + 0.5; - pixfac = 72.0 / dpi * devpix; - - ## Compute padding to round cols * bps up to the nearest multiple of 8 - ## (nr and nc are switched because we transposed the image above). - - padright = (((img_nr * bps + 7) / 8) * 8 - img_nr * bps) / bps; - - scols = img_nr * pixfac; - srows = img_nc * pixfac; - scale = 1; - - if (scols > pagewid * MARGIN || srows > pagehgt * MARGIN) - if (scols > pagewid * MARGIN) - scale = scale * (pagewid / scols * MARGIN); - scols = scale * img_nr * pixfac; - srows = scale * img_nc * pixfac; - endif - if (srows > pagehgt * MARGIN) - scale = scale * (pagehgt / srows * MARGIN); - scols = scale * img_nr * pixfac; - srows = scale * img_nc * pixfac; - endif - warning ("image too large for page, rescaling to %g", scale); - endif - - llx = (pagewid - scols) / 2; - lly = (pagehgt - srows) / 2; - urx = llx + fix (scols + 0.5); - ury = lly + fix (srows + 0.5); - - fid = fopen (fname, "wb"); - - fprintf (fid, "%%!PS-Adobe-2.0 EPSF-2.0\n"); - fprintf (fid, "%%%%Creator: Octave %s (saveimage.m)\n", OCTAVE_VERSION); - fprintf (fid, "%%%%Title: %s\n", fname); - fprintf (fid, "%%%%Pages: 1\n"); - fprintf (fid, "%%%%BoundingBox: %d %d %d %d\n", - fix (llx), fix (lly), fix (urx), fix (ury)); - fprintf (fid, "%%%%EndComments\n"); - fprintf (fid, "/readstring {\n"); - fprintf (fid, " currentfile exch readhexstring pop\n"); - fprintf (fid, "} bind def\n"); - fprintf (fid, "/picstr %d string def\n", - fix ((img_nr + padright) * bps / 8)); - fprintf (fid, "%%%%EndProlog\n"); - fprintf (fid, "%%%%Page: 1 1\n"); - fprintf (fid, "gsave\n"); - fprintf (fid, "%g %g translate\n", llx, lly); - fprintf (fid, "%g %g scale\n", scols, srows); - fprintf (fid, "%d %d %d\n", img_nr, img_nc, bps); - fprintf (fid, "[ %d 0 0 -%d 0 %d ]\n", img_nr, img_nc, img_nc); - fprintf (fid, "{ picstr readstring }\n"); - fprintf (fid, "image\n"); - - img = map(img); - - fmt = "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n"; - fprintf (fid, fmt, img); - - if (rem (img_sz, 30) != 0) - fprintf (fid, "\n"); - endif - - fprintf (fid, "grestore\n"); - fprintf (fid, "showpage\n"); - fprintf (fid, "%%%%Trailer\n"); - fclose (fid); - - else - error ("saveimage: what happened to the image type?"); - endif - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/strerror.m +++ /dev/null @@ -1,72 +0,0 @@ -## Copyright (C) 1995-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} strerror (@var{name}, @var{num}) -## Return the text of an error message for function @var{name} -## corresponding to the error number @var{num}. This function is intended -## to be used to print useful error messages for those functions that -## return numeric error codes. -## @end deftypefn - -## Author: jwe - -function msg = strerror (name, num) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "strerror is obsolete and will be removed from a future version of Octave."); - endif - - if (nargin != 2) - print_usage (); - endif - - if (! ischar (name)) - error ("strerror: first argument must be a string"); - endif - - if (! isscalar (num)) - error ("strerror: second argument must be a scalar"); - endif - - if (strcmp (name, "fsolve")) - - if (num == -2) - msg = "input error\n"; - elseif (num == -1) - msg = "error encountered in user-supplied function\n"; - elseif (num == 1) - msg = "solution converged to requested tolerance\n"; - elseif (num == 3) - msg = "iteration is not making good progress\n"; - elseif (num == 4) - msg = "iteration limit exceeded\n"; - else - error ("strerror: unrecognized error code for fsolve"); - endif - - else - - error ("strerror: unrecognized function NAME"); - - endif - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/values.m +++ /dev/null @@ -1,61 +0,0 @@ -## Copyright (C) 1995-2012 Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} values (@var{x}) -## Return the different values in a column vector, arranged in ascending -## order. -## -## As an example, @code{values([1, 2, 3, 1])} returns the vector -## @code{[1, 2, 3]}. -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Extract unique elements - -## Deprecated in version 3.4 - -function v = values (x) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "values is obsolete and will be removed from a future version of Octave; please use unique instead"); - endif - - if (nargin != 1) - print_usage (); - endif - - if (! (isvector (x))) - error ("values: X must be a vector"); - endif - - i = any (isnan (x)); - ## HACK! - x = x(find(!isnan (x))); - n = length (x); - x = reshape (x, n, 1); - s = sort (x); - v = s([1; (find (s(2:n) > s(1:n-1)) + 1)]); - if (i) - v = [v; NaN]; - endif - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/weibcdf.m +++ /dev/null @@ -1,47 +0,0 @@ -## Copyright (C) 2006-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} weibcdf (@var{x}, @var{scale}, @var{shape}) -## Compute the cumulative distribution function (CDF) at @var{x} of the -## Weibull distribution with shape parameter @var{scale} and scale -## parameter @var{shape}, which is -## -## @example -## 1 - exp(-(x/shape)^scale) -## @end example -## -## @noindent -## for @var{x} @geq{} 0. -## @end deftypefn - -## Deprecated in version 3.0 -## Matlab still has this function, so don't remove just yet. - -function cdf = weibcdf (varargin) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "weibcdf is obsolete and will be removed from a future version of Octave; please use wblcdf instead"); - endif - - cdf = wblcdf (varargin{:}); - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/weibinv.m +++ /dev/null @@ -1,40 +0,0 @@ -## Copyright (C) 2006-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} weibinv (@var{x}, @var{scale}, @var{shape}) -## Compute the quantile (the inverse of the CDF) at @var{x} of the -## Weibull distribution with shape parameter @var{scale} and scale -## parameter @var{shape}. -## @end deftypefn - -## Deprecated in version 3.0 -## Matlab still has this function, so don't remove just yet. - -function inv = weibinv (varargin) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "weibinv is obsolete and will be removed from a future version of Octave; please use wblinv instead"); - endif - - inv = wblinv (varargin{:}); - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/weibpdf.m +++ /dev/null @@ -1,47 +0,0 @@ -## Copyright (C) 2006-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} weibpdf (@var{x}, @var{scale}, @var{shape}) -## Compute the probability density function (PDF) at @var{x} of the -## Weibull distribution with shape parameter @var{scale} and scale -## parameter @var{shape} which is given by -## -## @example -## scale * shape^(-scale) * x^(scale-1) * exp(-(x/shape)^scale) -## @end example -## -## @noindent -## for @var{x} > 0. -## @end deftypefn - -## Deprecated in version 3.0 -## Matlab still has this function, so don't remove just yet. - -function pdf = weibpdf (varargin) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "weibpdf is obsolete and will be removed from a future version of Octave; please use wblpdf instead"); - endif - - pdf = wblpdf (varargin{:}); - -endfunction
deleted file mode 100644 --- a/scripts/deprecated/weibrnd.m +++ /dev/null @@ -1,46 +0,0 @@ -## Copyright (C) 2006-2012 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} weibrnd (@var{scale}, @var{shape}, @var{r}, @var{c}) -## @deftypefnx {Function File} {} weibrnd (@var{scale}, @var{shape}, @var{sz}) -## Return an @var{r} by @var{c} matrix of random samples from the -## Weibull distribution with parameters @var{scale} and @var{shape} -## which must be scalar or of size @var{r} by @var{c}. Or if @var{sz} -## is a vector return a matrix of size @var{sz}. -## -## If @var{r} and @var{c} are omitted, the size of the result matrix is -## the common size of @var{alpha} and @var{sigma}. -## @end deftypefn - -## Deprecated in version 3.0 -## Matlab still has this function, so don't remove just yet. - -function rnd = weibrnd (varargin) - - persistent warned = false; - if (! warned) - warned = true; - warning ("Octave:deprecated-function", - "weibrnd is obsolete and will be removed from a future version of Octave; please use wblrnd instead"); - endif - - rnd = wblrnd (varargin{:}); - -endfunction -