# HG changeset patch # User jwe # Date 856288281 0 # Node ID 6243c37ae2c5eab81e9dc8787f999721efe3563b # Parent eb2ade3c66099671d86dae942400c25a396de122 [project @ 1997-02-18 17:51:21 by jwe] diff -r eb2ade3c6609 -r 6243c37ae2c5 scripts/general/linspace.m --- a/scripts/general/linspace.m Tue Feb 18 17:00:34 1997 +0000 +++ b/scripts/general/linspace.m Tue Feb 18 17:51:21 1997 +0000 @@ -1,34 +1,36 @@ -# Copyright (C) 1993, 1994, 1995 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 2, 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, write to the Free -# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +## Copyright (C) 1993, 1994, 1995 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 2, 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, write to the Free +## Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +## usage: linspace (x1, x2, n) +## +## Return a vector of n equally spaced points between x1 and x2 +## inclusive. +## +## If the final argument is omitted, n = 100 is assumed. +## +## All three arguments must be scalars. +## +## See also: logspace + +## Author: jwe function retval = linspace (x1, x2, n) -# usage: linspace (x1, x2, n) -# -# Return a vector of n equally spaced points between x1 and x2 -# inclusive. -# -# If the final argument is omitted, n = 100 is assumed. -# -# All three arguments must be scalars. -# -# See also: logspace - if (nargin == 2) npoints = 100; elseif (nargin == 3) @@ -45,8 +47,8 @@ error ("linspace: npoints must be greater than 2"); endif -# In some cases x1 + delta * (npoints - 1) will not be equal to x2, so -# we cheat and force the last value to be x2. + ## In some cases x1 + delta * (npoints - 1) will not be equal to x2, + ## so we cheat and force the last value to be x2. if (length (x1) == 1 && length (x2) == 1) delta = (x2 - x1) / (npoints - 1); diff -r eb2ade3c6609 -r 6243c37ae2c5 scripts/linear-algebra/pinv.m --- a/scripts/linear-algebra/pinv.m Tue Feb 18 17:00:34 1997 +0000 +++ b/scripts/linear-algebra/pinv.m Tue Feb 18 17:51:21 1997 +0000 @@ -1,37 +1,38 @@ -# Copyright (C) 1994 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 2, 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, write to the Free -# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +## Copyright (C) 1994 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 2, 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, write to the Free +## Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +## usage: pinv (X, tol) +## +## Returns the pseudoinverse of X; singular values less than tol are +## ignored. +## +## If the second argument is omitted, it is assumed that +## +## tol = max (size (X)) * sigma_max (X) * eps, +## +## where sigma_max(X) is the maximal singular value of X. + +## Author: Kurt Hornik (hornik@neuro.tuwien.ac.at> +## Created: March 1993. +## Adapted-By: jwe function retval = pinv (X, tol) -# usage: pinv (X, tol) -# -# Returns the pseudoinverse of X; singular values less than tol are -# ignored. -# -# If the second argument is omitted, it is assumed that -# -# tol = max (size (X)) * sigma_max (X) * eps, -# -# where sigma_max(X) is the maximal singular value of X. - -# Written by Kurt Hornik (hornik@neuro.tuwien.ac.at) March 1993. -# Dept of Probability Theory and Statistics TU Wien, Austria. - if (nargin < 1 || nargin > 2) error ("usage: pinv (X [, tol])"); endif diff -r eb2ade3c6609 -r 6243c37ae2c5 scripts/miscellaneous/dump_1_pref.m --- a/scripts/miscellaneous/dump_1_pref.m Tue Feb 18 17:00:34 1997 +0000 +++ b/scripts/miscellaneous/dump_1_pref.m Tue Feb 18 17:51:21 1997 +0000 @@ -17,6 +17,8 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## This is an internal function used by dump_prefs(). + ## Author: jwe function dump_1_pref (file, var) diff -r eb2ade3c6609 -r 6243c37ae2c5 scripts/plot/__pltopt__.m --- a/scripts/plot/__pltopt__.m Tue Feb 18 17:00:34 1997 +0000 +++ b/scripts/plot/__pltopt__.m Tue Feb 18 17:51:21 1997 +0000 @@ -17,8 +17,6 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -## Originally written by Rick Niles . - ## usage: fmt = __pltopt__ (caller, opt) ## ## Decode plot option strings. @@ -39,7 +37,7 @@ ## "~" for errorbars plot style. ## "#~" for boxerrorbars plot style. ## "n" with n in 1-6 (wraps at 8), plot color -## "nm" with m in 1-6 (wraps at 6), point style (only valid with "@" or "-@") +## "nm" with m in 1-6 (wraps at 6), point style (only valid for "@" or "-@") ## "c" where c is one of ["r", "g", "b", "m", "c", "w"] colors. ## ## Special points formats: @@ -60,7 +58,9 @@ ## 5 cyan house ## 6 brown there exists -## Author: jwe +## Author: Rick Niles +## Adapted-By: jwe +## Maintainer: jwe function fmt = __pltopt__ (caller, opt) diff -r eb2ade3c6609 -r 6243c37ae2c5 scripts/strings/strcat.m --- a/scripts/strings/strcat.m Tue Feb 18 17:00:34 1997 +0000 +++ b/scripts/strings/strcat.m Tue Feb 18 17:51:21 1997 +0000 @@ -17,6 +17,10 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## usage: strcat (s, t, ...) +## +## Concatenate strings. + ## Author: jwe function st = strcat (s, t, ...)