Mercurial > hg > octave-terminal
changeset 2312:204cc7db6f4a
[project @ 1996-07-11 21:20:36 by jwe]
line wrap: on
line diff
--- a/scripts/audio/lin2mu.m +++ b/scripts/audio/lin2mu.m @@ -22,11 +22,12 @@ ## x is a vector of an 8- or 16-bit linearly encoded audio sample, ## This is transformed into a mu-law encoded vector. +## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at> +## Created: 17 October 1994 +## Adapted-By: jwe + function y = lin2mu (x) - ## Written by AW (Andreas.Weingessel@ci.tuwien.ac.at) on Oct 17, 1994 - ## Copyright Department of Probability Theory and Statistics TU Wien - if (nargin != 1) usage ("y = lin2mu (x)"); endif
--- a/scripts/audio/loadaudio.m +++ b/scripts/audio/loadaudio.m @@ -32,11 +32,12 @@ ## mu-law encoded files are transformed to 8 and 16-bit linear ## format, respectively. +## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at> +## Created: 10 April 1994 +## Adapted-By: jwe + function X = loadaudio (name, ext, bit) - ## Written by AW (Andreas.Weingessel@ci.tuwien.ac.at) on Apr 10, 1994 - ## Last modified by AW on Oct 29, 1994 - if (nargin == 0 || nargin > 3) usage ("loadaudio (name [, ext [, bit]])"); endif
--- a/scripts/audio/mu2lin.m +++ b/scripts/audio/mu2lin.m @@ -24,12 +24,12 @@ ## The optional argument bit specifies whether the input data is ## 8 bit (default) or 16 bit. +## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at> +## Created: 18 October 1994 +## Adapted-By: jwe + function y = mu2lin (x, bit) - ## Written by AW (Andreas.Weingessel@ci.tuwien.ac.at) on Oct 18, 1994 - ## Updated by AW (Andreas.Weingessel@ci.tuwien.ac.at) on Oct 27, 1994 - ## Copyright Department of Probability Theory and Statistics TU Wien - if (nargin == 1) bit = 8; elseif (nargin == 2)
--- a/scripts/audio/playaudio.m +++ b/scripts/audio/playaudio.m @@ -31,12 +31,12 @@ ## ## `playaudio (X)' plays the audio data contained in the vector X. +## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at> +## Created: 11 April 1994 +## Adapted-By: jwe + function playaudio (name, ext) - ## Written by AW (Andreas.Weingessel@ci.tuwien.ac.at) on Apr 11, 1994 - ## Last modified by AW on Nov 7, 1994 - ## Copyright Dept of Probability Theory and Statistics TU Wien - file = octave_tmp_file_name (); usage_msg = "playaudio (name [, ext]) or playaudio (X)";
--- a/scripts/audio/record.m +++ b/scripts/audio/record.m @@ -24,11 +24,11 @@ ## The program waits for you to hit the ENTER key, then the recording ## starts immediatly. -function X = record (sec, sampling_rate) +## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at> +## Created: 19 September 1994 +## Adapted-By: jwe - ## Written by AW (Andreas.Weingessel@ci.tuwien.ac.at) on Sep 19, 1994 - ## Last modified by AW on Oct 5, 1994 - ## Copyright Dept of Probability Theory and Statistics TU Wien +function X = record (sec, sampling_rate) if (nargin == 1) sampling_rate = 8000;
--- a/scripts/audio/saveaudio.m +++ b/scripts/audio/saveaudio.m @@ -29,12 +29,12 @@ ## If the data is saved linearly, the bit argument decides whether an ## 8-bit (default) or a 16-bit format is used. +## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at> +## Created: 5 September 1994 +## Adapted-By: jwe + function saveaudio (name, X, ext, bit) - ## Written by AW (Andreas.Weingessel@ci.tuwien.ac.at) on Sep 5, 1994 - ## Last modified by AW on Oct 29, 1994 - ## Copyright Dept of Probability Theory and Statistics TU Wien - if (nargin < 2 || nargin > 4) usage ("saveaudio (X, name [, ext [, bit]])"); endif
--- a/scripts/audio/setaudio.m +++ b/scripts/audio/setaudio.m @@ -21,12 +21,12 @@ ## ## executes the shell command `mixer [w_type [, value]]' +## Author: AW <Andreas.Weingessel@ci.tuwien.ac.at> +## Created: 5 October 1994 +## Adapted-By: jwe + function setaudio (w_type, value) - ## Written by AW (Andreas.Weingessel@ci.tuwien.ac.at) on Oct 5, 1994 - ## Updated by AW on Nov 3, 1994 - ## Copyright Department of Probability Theory and Statistics TU Wien - if (nargin == 0) system ("mixer"); elseif (nargin == 1)
--- a/scripts/control/abcddim.m +++ b/scripts/control/abcddim.m @@ -28,9 +28,11 @@ ## ## Returns n = m = p = -1 if the system is not compatible. -function [n, m, p] = abcddim (a, b, c, d) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function [n, m, p] = abcddim (a, b, c, d) if (nargin != 4) error ("usage: abcddim (a, b, c, d)");
--- a/scripts/control/are.m +++ b/scripts/control/are.m @@ -33,9 +33,11 @@ ## ## See also: balance -function x = are (a, b, c, opt) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function x = are (a, b, c, opt) if (nargin == 3 || nargin == 4) if (nargin == 4)
--- a/scripts/control/c2d.m +++ b/scripts/control/c2d.m @@ -29,10 +29,11 @@ ## ## assuming a zero-order hold on the input and sample time T. -function [Ad, Bd] = c2d (Ac, Bc, T) +## Author: R.B. Tenison <btenison@eng.auburn.edu> +## Created: October 1993 +## Adapted-By: jwe - ## Written by R.B. Tenison (btenison@eng.auburn.edu) - ## October 1993 +function [Ad, Bd] = c2d (Ac, Bc, T) ## check args if (nargin != 3)
--- a/scripts/control/dare.m +++ b/scripts/control/dare.m @@ -44,9 +44,11 @@ ## ## See also: balance, are -function x = dare (a, b, c, r, opt) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function x = dare (a, b, c, r, opt) if (nargin == 4 || nargin == 5) if (nargin == 5)
--- a/scripts/control/dgram.m +++ b/scripts/control/dgram.m @@ -24,10 +24,12 @@ ## dgram (A, B) returns the discrete controllability gramian. ## dgram (A', C') returns the observability gramian. -function gramian = dgram (A, B) +## Author: R. Bruce Tenison <btenison@eng.auburn.edu> +## Created: October 1993 +## Adapted-By: jwe - ## Written by R. Bruce Tenison (btenison@eng.auburn.edu) - ## October 1993 + +function gramian = dgram (A, B) [U, Sig, V] = svd (B);
--- a/scripts/control/dlqe.m +++ b/scripts/control/dlqe.m @@ -40,11 +40,12 @@ ## p = the estimate error covariance after the measurement update ## e = closed loop poles of (A - A L C) -function [l, m, p, e] = dlqe (a, g, c, sigw, sigv, zz) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## R. Bruce Tenison <btenison@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August, 1993. - ## Modified for discrete time by R. Bruce Tenison (btenison@eng.auburn.edu) - ## October, 1993 +function [l, m, p, e] = dlqe (a, g, c, sigw, sigv, zz) if (nargin != 5 && nargin != 6) error ("dlqe: invalid number of arguments");
--- a/scripts/control/dlqr.m +++ b/scripts/control/dlqr.m @@ -37,11 +37,12 @@ ## p = solution of algebraic Riccati equation ## e = closed loop poles of (A - B K) -function [k, p, e] = dlqr (a, b, q, r, zz) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## R. B. Tenison <btenison@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. - ## Converted to discrete time by R. B. Tenison - ## (btenison@eng.auburn.edu) October 1993 +function [k, p, e] = dlqr (a, b, q, r, zz) if (nargin != 4 && nargin != 5) error ("dlqr: invalid number of arguments");
--- a/scripts/control/dlyap.m +++ b/scripts/control/dlyap.m @@ -32,9 +32,11 @@ ## whichever is appropriate. Uses Schur decomposition as in Kitagawa ## (1977). -function x = dlyap (a, b) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function x = dlyap (a, b) if ((n = is_square (a)) == 0) warning ("dlyap: a must be square");
--- a/scripts/control/is_controllable.m +++ b/scripts/control/is_controllable.m @@ -35,9 +35,11 @@ ## ## tol is a roundoff paramter, set to 2*eps if omitted. -function retval = is_controllable (a, b, tol) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August, 1993. +function retval = is_controllable (a, b, tol) if (nargin == 2 || nargin == 3)
--- a/scripts/control/is_observable.m +++ b/scripts/control/is_observable.m @@ -23,9 +23,11 @@ ## ## See also: size, rows, columns, length, is_matrix, is_scalar, is_vector. -function retval = is_observable (a,c,tol) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function retval = is_observable (a,c,tol) if (nargin == 2) retval = is_controllable (a', c');
--- a/scripts/control/lqe.m +++ b/scripts/control/lqe.m @@ -38,9 +38,11 @@ ## p = solution of algebraic Riccati equation ## e = closed loop poles of (A - K C) -function [k, p, e] = lqe (a, g, c, sigw, sigv, zz) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August, 1993. +function [k, p, e] = lqe (a, g, c, sigw, sigv, zz) if (nargin != 5 && nargin != 6) error ("lqe: invalid number of arguments");
--- a/scripts/control/lqr.m +++ b/scripts/control/lqr.m @@ -37,9 +37,11 @@ ## p = solution of algebraic Riccati equation ## e = closed loop poles of (A - B K) -function [k, p, e] = lqr (a, b, q, r, zz) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function [k, p, e] = lqr (a, b, q, r, zz) if (nargin != 4 && nargin != 5) error ("lqr: invalid number of arguments");
--- a/scripts/control/lyap.m +++ b/scripts/control/lyap.m @@ -41,10 +41,11 @@ ## ## Solves by using the Bartels-Stewart algorithm (1972). -function x = lyap (a, b, c) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. - +function x = lyap (a, b, c) if (nargin != 3 && nargin != 2) usage ("lyap (a, b {,c})");
--- a/scripts/control/tzero.m +++ b/scripts/control/tzero.m @@ -25,9 +25,11 @@ ## ## Needs to incorporate mvzero algorithm to isolate finite zeros. -function zr = tzero (a, b, c, d, bal) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function zr = tzero (a, b, c, d, bal) if (nargin == 4) bal = "B";
--- a/scripts/elfun/gcd.m +++ b/scripts/elfun/gcd.m @@ -25,9 +25,11 @@ ## ## [g [, v]] = gcd (a1, ..., ak) is the same with a = [a1, ..., ak]. -function [g, v] = gcd (a, ...) +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 16 September 1994 +## Adapted-By: jwe -## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Sep 16, 1994. +function [g, v] = gcd (a, ...) if (nargin > 1) va_start;
--- a/scripts/elfun/lcm.m +++ b/scripts/elfun/lcm.m @@ -23,11 +23,12 @@ ## integer vector a. ## lcm (a1, ..., ak) is the same as lcm([a1, ..., ak]). +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 16 September 1994 +## Adapted-By: jwe + function l = lcm (a, ...) -## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Sep 16, 1994. - - if (nargin > 1) va_start; for k = 2:nargin; a = [a, (va_arg ())];
--- a/scripts/general/is_square.m +++ b/scripts/general/is_square.m @@ -24,9 +24,11 @@ ## ## See also: size, rows, columns, length, is_matrix, is_scalar, is_vector -function retval = is_square (x) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function retval = is_square (x) if (nargin == 1) [nr, nc] = size (x);
--- a/scripts/general/is_symmetric.m +++ b/scripts/general/is_symmetric.m @@ -24,9 +24,11 @@ ## See also: size, rows, columns, length, is_matrix, is_scalar, ## is_square, is_vector -function retval = is_symmetric (x,tol) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function retval = is_symmetric (x,tol) if (nargin == 1 || nargin == 2) if ((retval = is_square (x)))
--- a/scripts/image/colormap.m +++ b/scripts/image/colormap.m @@ -29,9 +29,11 @@ ## ## colormap with no arguments returns the current colormap. -function cmap = colormap (map) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function cmap = colormap (map) global CURRENT_COLOR_MAP
--- a/scripts/image/gray.m +++ b/scripts/image/gray.m @@ -19,9 +19,11 @@ ## Colormap. -function map = gray (number) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function map = gray (number) if (nargin == 0) number = 64;
--- a/scripts/image/gray2ind.m +++ b/scripts/image/gray2ind.m @@ -19,9 +19,11 @@ ## Image format conversion -function [X, map] = gray2ind (I, n) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function [X, map] = gray2ind (I, n) if (nargin < 1 || nargin > 2) usage ("gray2ind (I, n)");
--- a/scripts/image/image.m +++ b/scripts/image/image.m @@ -27,9 +27,11 @@ ## ## SEE ALSO: imshow, imagesc, colormap. -function image (x, zoom) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function image (x, zoom) if (nargin == 0) ## Load Bobbie Jo Richardson (Born 3/16/94)
--- a/scripts/image/imagesc.m +++ b/scripts/image/imagesc.m @@ -27,9 +27,11 @@ ## ## SEE ALSO: image, imshow -function x = imagesc (x, zoom) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function x = imagesc (x, zoom) if (nargin < 1 || nargin > 2) usage ("image (matrix, [zoom])");
--- a/scripts/image/imshow.m +++ b/scripts/image/imshow.m @@ -29,9 +29,11 @@ ## ## SEE ALSO: image, imagesc, colormap, gray2ind, rgb2ind. -function imshow (a1, a2, a3) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function imshow (a1, a2, a3) if (nargin < 0 || nargin > 3) usage ("imshow (args)");
--- a/scripts/image/ind2gray.m +++ b/scripts/image/ind2gray.m @@ -28,9 +28,11 @@ ## ## SEE ALSO: gray2ind, rgb2ntsc, image, colormap -function Y = ind2gray (X, map) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function Y = ind2gray (X, map) if (nargin < 1 || nargin > 2) usage ("ind2gray (X, map)");
--- a/scripts/image/ind2rgb.m +++ b/scripts/image/ind2rgb.m @@ -25,9 +25,11 @@ ## ## SEE ALSO: rgb2ind, image, imshow, ind2gray, gray2ind. -function [R, G, B] = ind2rgb (X, map) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function [R, G, B] = ind2rgb (X, map) if (nargin < 1 || nargin > 2) usage ("ind2rgb (X, map)");
--- a/scripts/image/loadimage.m +++ b/scripts/image/loadimage.m @@ -25,9 +25,11 @@ ## ## SEE ALSO: saveimage, load, save -function [X, map] = loadimage (filename) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function [X, map] = loadimage (filename) if (nargin != 1) usage ("loadimage (filename)");
--- a/scripts/image/ntsc2rgb.m +++ b/scripts/image/ntsc2rgb.m @@ -19,9 +19,11 @@ ## Image format conversion. -function rgb = ntsc2rgb (yiq) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function rgb = ntsc2rgb (yiq) if (nargin != 1) usage ("ntsc2rgb (yiq)");
--- a/scripts/image/ocean.m +++ b/scripts/image/ocean.m @@ -19,9 +19,11 @@ ## Colormap. -function map = ocean (number) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function map = ocean (number) if (nargin == 0) number = 64;
--- a/scripts/image/rgb2ind.m +++ b/scripts/image/rgb2ind.m @@ -25,9 +25,11 @@ ## ## Bugs: The color map may have duplicate entries. -function [X, map] = rgb2ind (R, G, B) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function [X, map] = rgb2ind (R, G, B) if (nargin != 3) usage ("[X, map] = rgb2ind (R, G, B)");
--- a/scripts/image/rgb2ntsc.m +++ b/scripts/image/rgb2ntsc.m @@ -19,9 +19,11 @@ ## Image format conversion. -function yiq = rgb2ntsc (rgb) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +function yiq = rgb2ntsc (rgb) if (nargin != 1) usage ("rgb2ntsc (rgb)");
--- a/scripts/image/saveimage.m +++ b/scripts/image/saveimage.m @@ -52,25 +52,27 @@ ## ## SEE ALSO: loadimage, save, load, colormap -function saveimage (filename, img, img_form, map) - - ## Written by Tony Richardson (amr@mpl.ucsd.edu) July 1994. +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: July 1994 +## Adapted-By: jwe - ## Rewritten by jwe to avoid using octoppm and pbm routines so that - ## people who don't have the 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. +## Rewritten by jwe to avoid using octoppm and pbm routines so that +## people who don't have the 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 (filename, img, img_form, map) if (nargin < 2 || nargin > 4) usage ("saveimage (filename, matrix, [format, [colormap]])");
--- a/scripts/linear-algebra/kron.m +++ b/scripts/linear-algebra/kron.m @@ -24,9 +24,11 @@ ## ## x = [a(i,j) b] -function x = kron (a, b) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function x = kron (a, b) if (nargin == 2)
--- a/scripts/linear-algebra/null.m +++ b/scripts/linear-algebra/null.m @@ -27,9 +27,11 @@ ## max (size (A)) * sigma_max (A) * eps, where sigma_max (A) is the ## maximal singular value of A. -function retval = null (A, tol) +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 24 December 1993. +## Adapted-By: jwe - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Dec 24, 1993. +function retval = null (A, tol) [U, S, V] = svd (A);
--- a/scripts/linear-algebra/orth.m +++ b/scripts/linear-algebra/orth.m @@ -27,9 +27,11 @@ ## max (size (A)) * sigma_max (A) * eps, where sigma_max (A) is the ## maximal singular value of A. -function retval = orth (A, tol) +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 24 December 1993. +## Adapted-By: jwe - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Dec 24, 1993. +function retval = orth (A, tol) [U, S, V] = svd (A);
--- a/scripts/linear-algebra/qzhess.m +++ b/scripts/linear-algebra/qzhess.m @@ -30,9 +30,11 @@ ## ## Algorithm taken from Golub and Van Loan, Matrix Computations, 2nd ed. -function [aa, bb, q, z] = qzhess (a, b) +## Author: A. S. Hodel <scotte@eng.auburn.edu> +## Created: August 1993 +## Adapted-By: jwe - ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. +function [aa, bb, q, z] = qzhess (a, b) if (nargin != 2) error ("usage: [aa, bb, q, z] = qzhess (a, b)");
--- a/scripts/plot/bottom_title.m +++ b/scripts/plot/bottom_title.m @@ -26,9 +26,10 @@ ## rather than the top. ## -function bottom_title (text) +## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> +## Adapted-By: jwe - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU +function bottom_title (text) if (! gnuplot_has_multiplot) error ("bottom_title: gnuplot does not appear to support this feature");
--- a/scripts/plot/mplot.m +++ b/scripts/plot/mplot.m @@ -30,10 +30,10 @@ ## See command plot() for the various options to this command ## as this is just mulitplot version of the same command. -function mplot (...) +## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> +## Adapted-By: jwe - - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU +function mplot (...) if (! gnuplot_has_multiplot) error ("mplot: gnuplot does not appear to support this feature");
--- a/scripts/plot/multiplot.m +++ b/scripts/plot/multiplot.m @@ -28,9 +28,11 @@ ## NOTE: this will work only with gnuplot installed with ## multiplot patch -function multiplot (xn, yn) +## Author: Vinayak Dutt, Dutt.Vinayak@mayo.EDU +## Created: 3 July 95 +## Adapted-By: jwe - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU 3 Jul 95 +function multiplot (xn, yn) if (! gnuplot_has_multiplot) error ("multiplot: gnuplot does not appear to support this feature");
--- a/scripts/plot/oneplot.m +++ b/scripts/plot/oneplot.m @@ -25,9 +25,11 @@ ## Switches from multiplot (if in multiplot mode) to single plot ## mode -function oneplot () +## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> +## Created: 3 July 95 +## Adapted-By: jwe - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU 3 Jul 95 +function oneplot () if (! gnuplot_has_multiplot) error ("oneplot: gnuplot does not appear to support this feature");
--- a/scripts/plot/plot_border.m +++ b/scripts/plot/plot_border.m @@ -36,9 +36,11 @@ ## ## Without any arguments, turns borders off. -function plot_border (...) +## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> +## Created: 3 July 95 +## Adapted-By: jwe - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU 3 Jul 95 +function plot_border (...) if (! gnuplot_has_multiplot) error ("plot_border: gnuplot does not appear to support this feature");
--- a/scripts/plot/subplot.m +++ b/scripts/plot/subplot.m @@ -53,9 +53,10 @@ ## ----------------------------------- ## -function subplot (rows, columns, index) +## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> +## Adapted-By: jwe - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU +function subplot (rows, columns, index) if (! gnuplot_has_multiplot) error ("subplot: gnuplot does not appear to support this feature");
--- a/scripts/plot/subwindow.m +++ b/scripts/plot/subwindow.m @@ -26,9 +26,11 @@ ## multiplot mode has to be previously initialized using multiplot() ## command, else this command just becomes an aliad to multiplot() -function subwindow (xn, yn) +## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> +## Created: 3 July 95 +## Adapted-By: jwe - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU 3 Jul 95 +function subwindow (xn, yn) if (! gnuplot_has_multiplot) error ("subwindow: gnuplot does not appear to support this feature");
--- a/scripts/plot/top_title.m +++ b/scripts/plot/top_title.m @@ -24,9 +24,11 @@ ## ## makes a title with text "text" at the top of the plot -function top_title (text) +## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> +## Created: 3 July 95 +## Adapted-By: jwe - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU 3 Jul 95 +function top_title (text) if (! gnuplot_has_multiplot) error ("top_title: gnuplot does not appear to support this feature");
--- a/scripts/plot/zlabel.m +++ b/scripts/plot/zlabel.m @@ -24,9 +24,11 @@ ## ## See other plotting commands also. -function zlabel (text) +## Author: Vinayak Dutt <Dutt.Vinayak@mayo.EDU> +## Created: 3 July 95 +## Adapted-By: jwe - ## Written by Vinayak Dutt, Dutt.Vinayak@mayo.EDU 3 Jul 95 +function zlabel (text) if (nargin != 1) usage ("zlabel (text)");
--- a/scripts/polynomial/compan.m +++ b/scripts/polynomial/compan.m @@ -42,9 +42,11 @@ ## ## SEE ALSO: poly, roots, residue, conv, deconv, polyval, polyderiv, polyinteg -function A = compan (c) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. +function A = compan (c) if (nargin != 1) usage ("compan (vector)");
--- a/scripts/polynomial/conv.m +++ b/scripts/polynomial/conv.m @@ -29,10 +29,12 @@ ## ## SEE ALSO: deconv, poly, roots, residue, polyval, polyderiv, polyinteg +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe + function y = conv (a, b) - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. - if (nargin != 2) usage ("conv(a, b)"); endif
--- a/scripts/polynomial/deconv.m +++ b/scripts/polynomial/deconv.m @@ -31,9 +31,11 @@ ## SEE ALSO: conv, poly, roots, residue, polyval, polyderiv, ## polyinteg -function [b, r] = deconv (y, a) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. +function [b, r] = deconv (y, a) if (nargin != 2) usage ("deconv (y, a)");
--- a/scripts/polynomial/poly.m +++ b/scripts/polynomial/poly.m @@ -26,9 +26,11 @@ ## If x is a vector, poly (x) is a vector of coefficients of the ## polynomial whose roots are the elements of x. -function y = poly (x) +## Author: KH <Kurt.Hornik@neuro.tuwien.ac.at> +## Created: 24 December 1993 +## Adapted-By: jwe - ## Written by KH (Kurt.Hornik@neuro.tuwien.ac.at) Dec 24, 1993. +function y = poly (x) if (nargin != 1) usage ("poly (x)");
--- a/scripts/polynomial/polyderiv.m +++ b/scripts/polynomial/polyderiv.m @@ -25,9 +25,11 @@ ## SEE ALSO: poly, polyinteg, polyreduce, roots, conv, deconv, residue, ## filter, polyval, polyvalm -function q = polyderiv (p) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. +function q = polyderiv (p) if (nargin != 1) usage ("polyderiv (vector)");
--- a/scripts/polynomial/polyfit.m +++ b/scripts/polynomial/polyfit.m @@ -23,11 +23,13 @@ ## minimizes sumsq (p(x(i)) - y(i)), i.e., that best fits the data ## in the least squares sense. +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 13 December 1994 +## Adapted-By: jwe + function p = polyfit (x, y, n) - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Dec 13, 1994 - ## Copyright Dept of Statistics and Probability Theory TU Wien - + if (nargin != 3) usage ("polyfit (x, y, n)"); endif
--- a/scripts/polynomial/polyinteg.m +++ b/scripts/polynomial/polyinteg.m @@ -27,9 +27,11 @@ ## SEE ALSO: poly, polyderiv, polyreduce, roots, conv, deconv, residue, ## filter, polyval, polyvalm -function p = polyinteg (p) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. +function p = polyinteg (p) if(nargin != 1) usage ("polyinteg (vector)");
--- a/scripts/polynomial/polyreduce.m +++ b/scripts/polynomial/polyreduce.m @@ -25,9 +25,11 @@ ## SEE ALSO: poly, roots, conv, deconv, residue, filter, polyval, polyvalm, ## polyderiv, polyinteg -function p = polyreduce (p) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. +function p = polyreduce (p) index = find (p == 0);
--- a/scripts/polynomial/polyval.m +++ b/scripts/polynomial/polyval.m @@ -35,9 +35,11 @@ ## SEE ALSO: polyvalm, poly, roots, conv, deconv, residue, filter, ## polyderiv, polyinteg -function y = polyval (c, x) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. +function y = polyval (c, x) if (nargin != 2) usage ("polyval (c, x)");
--- a/scripts/polynomial/polyvalm.m +++ b/scripts/polynomial/polyvalm.m @@ -36,9 +36,11 @@ ## SEE ALSO: polyval, poly, roots, conv, deconv, residue, filter, ## polyderiv, polyinteg -function y = polyvalm (c, x) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. +function y = polyvalm (c, x) if(nargin != 2) usage ("polyvalm (c, x)");
--- a/scripts/polynomial/residue.m +++ b/scripts/polynomial/residue.m @@ -62,9 +62,11 @@ ## ## SEE ALSO: poly, roots, conv, deconv, polyval, polyderiv, polyinteg -function [r, p, k, e] = residue (b, a, toler) +## Author: Tony Richardson <amr@mpl.ucsd.edu> +## Created: June 1994 +## Adapted-By: jwe - ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. +function [r, p, k, e] = residue (b, a, toler) ## Here's the method used to find the residues. ## The partial fraction expansion can be written as:
--- a/scripts/polynomial/roots.m +++ b/scripts/polynomial/roots.m @@ -22,11 +22,12 @@ ## For a vector v with n components, return the roots of the ## polynomial v(1) * z^(n-1) + ... + v(n-1) * z + v(n). +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 24 December 1993 +## Adapted-By: jwe + function r = roots (v) - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Dec 24, 1993 - ## Updated by KH on Nov 25, 1994 - if (min (size (v)) > 1 || nargin != 1) usage ("roots (v), where v is a vector"); endif
--- a/scripts/signal/fftconv.m +++ b/scripts/signal/fftconv.m @@ -27,10 +27,12 @@ ## The computation uses the FFT by calling fftfilt. If the optional ## argument N is specified, an N-point FFT is used. +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 3 September 1994 +## Adapted-By: jwe + function c = fftconv (a, b, N) - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Sep 3, 1994. - if (nargin < 2 || nargin > 3) usage ("fftconv (b, x [, N])"); endif
--- a/scripts/signal/fftfilt.m +++ b/scripts/signal/fftfilt.m @@ -22,14 +22,16 @@ ## y = fftfilt (b, x) filters x with the FIR filter b using the FFT. ## y = fftfilt (b, x, N) uses the overlap-add method to filter x with ## b using an N-point FFT. +## +## Reference: Oppenheim & Schafer (1989). Discrete-time Signal +## Processing (Chapter 8). Prentice-Hall. + +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 3 September 1994 +## Adapted-By: jwe function y = fftfilt (b, x, N) - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Sep 3, 1994 - - ## Reference: Oppenheim & Schafer (1989). Discrete-time Signal - ## Processing (Chapter 8). Prentice-Hall. - ## If N is not specified explicitly, we do not use the overlap-add ## method at all because loops are really slow. Otherwise, we only ## ensure that the number of points in the FFT is the smallest power
--- a/scripts/specfun/beta.m +++ b/scripts/specfun/beta.m @@ -22,10 +22,12 @@ ## Returns the beta function beta(a,b) = gamma(a) * gamma(b) / gamma(a+b) ## of a and b. +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 13 June 1993 +## Adapted-By: jwe + function retval = beta (a, b) - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Jun 13, 1993 - if (nargin != 2) usage ("beta (a, b)"); endif
--- a/scripts/specfun/betai.m +++ b/scripts/specfun/betai.m @@ -24,10 +24,12 @@ ## If x has more than one component, both a and b must be scalars. ## If x is a scalar, a and b must be of compatible dimensions. +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 2 August 1994. +## Adapted-By: jwe + function y = betai (a, b, x) - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Aug 2, 1994. - ## Computation is based on the series expansion ## betai(a, b, x) ## = \frac{1}{B(a, b)} x^a
--- a/scripts/specfun/gammai.m +++ b/scripts/specfun/gammai.m @@ -30,10 +30,12 @@ ## If neither a nor x is scalar, the sizes of a and x must agree, and ## gammai is applied pointwise. +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 13 August 1994 +## Adapted-By: jwe + function y = gammai (a, x) - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Aug 13, 1994 - if (nargin != 2) usage ("gammai (a, x)"); endif
--- a/scripts/statistics/corrcoef.m +++ b/scripts/statistics/corrcoef.m @@ -24,10 +24,11 @@ ## i-th variable in X and the j-th variable in Y. ## corrcoef(X) is corrcoef(X, X). -function retval = corrcoef (X, Y) +## Author: Kurt Hornik <hornik@ci.tuwien.ac.at> +## Created: March 1993 +## Adapted-By: jwe - ## Written by Kurt Hornik (hornik@ci.tuwien.ac.at) March 1993. - ## Dept of Probability Theory and Statistics TU Wien, Austria. +function retval = corrcoef (X, Y) if (nargin < 1 || nargin > 2) usage ("corrcoef (X [, Y])");
--- a/scripts/statistics/cov.m +++ b/scripts/statistics/cov.m @@ -24,10 +24,11 @@ ## between the i-th variable in X and the j-th variable in Y. ## cov(X) is cov(X, X). -function retval = cov (X, Y) +## Author: Kurt Hornik <hornik@ci.tuwien.ac.at> +## Created: March 1993 +## Adapted-By: jwe - ## Written by Kurt Hornik (hornik@ci.tuwien.ac.at) March 1993. - ## Dept of Probability Theory and Statistics TU Wien, Austria. +function retval = cov (X, Y) if (nargin < 1 || nargin > 2) usage ("cov (X [, Y])");
--- a/scripts/statistics/gls.m +++ b/scripts/statistics/gls.m @@ -33,11 +33,12 @@ ## v is the GLS estimator for s^2. ## R = Y - X*BETA is the matrix of GLS residuals. +## Author: Teresa Twaroch <twaroch@ci.tuwien.ac.at> +## Created: May 1993 +## Adapted-By: jwe + function [BETA, v, R] = gls (Y, X, O) - ## Written by Teresa Twaroch (twaroch@ci.tuwien.ac.at) May 1993. - ## Dept of Probability Theory and Statistics TU Wien, Austria. - if (nargin != 3) usage ("[BETA, v [, R]] = gls (Y, X, O)"); endif
--- a/scripts/statistics/kurtosis.m +++ b/scripts/statistics/kurtosis.m @@ -28,9 +28,11 @@ ## If x is a matrix, return a row vector containing the kurtosis for each ## column. -function retval = kurtosis (x) +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 29 July 1994 +## Adapted-By: jwe - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Jul 29, 1994. +function retval = kurtosis (x) if (nargin != 1) usage ("kurtosis (x)");
--- a/scripts/statistics/mahalanobis.m +++ b/scripts/statistics/mahalanobis.m @@ -23,10 +23,11 @@ ## samples X and Y, which must have the same number of components ## (columns), but may have a different number of observations (rows). -function retval = mahalanobis (X, Y) +## Author: Friedrich Leisch <leisch@ci.tuwien.ac.at> +## Created: July 1993 +## Adapted-By: jwe - ## Written by Friedrich Leisch (leisch@ci.tuwien.ac.at) July 1993. - ## Dept of Probability Theory and Statistics TU Wien, Austria. +function retval = mahalanobis (X, Y) if (nargin != 2) usage ("mahalanobis (X, Y)");
--- a/scripts/statistics/ols.m +++ b/scripts/statistics/ols.m @@ -39,10 +39,11 @@ ## ## R = Y - X*BETA is the matrix of OLS residuals. -function [BETA, SIGMA, R] = ols (Y, X) +## Author: Teresa Twaroch <twaroch@ci.tuwien.ac.at> +## Created: May 1993 +## Adapted-By: jwe - ## Written by Teresa Twaroch (twaroch@ci.tuwien.ac.at) May 1993. - ## Dept of Probability Theory and Statistics TU Wien, Austria. +function [BETA, SIGMA, R] = ols (Y, X) if (nargin != 2) error("usage : [BETA, SIGMA [, R]] = ols (Y, X)");
--- a/scripts/statistics/skewness.m +++ b/scripts/statistics/skewness.m @@ -28,9 +28,11 @@ ## If x is a matrix, return a row vector containing the skewness for each ## column. -function retval = skewness (x) +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 29 July 1994 +## Adapted-By: jwe - ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Jul 29, 1994. +function retval = skewness (x) if (nargin != 1) usage ("skewness (x)");
--- a/scripts/strings/strrep.m +++ b/scripts/strings/strrep.m @@ -22,11 +22,12 @@ ## Replace all occurences of the substring x of the string s with the ## string y. +## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> +## Created: 11 November 1994 +## Adapted-By: jwe + function t = strrep (s, x, y) -## Written by Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> on 1994/10/11 - ## Updated by Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> on 1996/05/25 - if (nargin <> 3) usage ("strrep (s, x, y)"); endif