# HG changeset patch # User jwe # Date 939695247 0 # Node ID eb27ea9b7ff82e97a806f8e82aa33489f0080319 # Parent 9e0c8e28955516326f8ff9fd971e112e2532bf59 [project @ 1999-10-12 02:22:25 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Mon Sep 20 11:02:29 1999 John W. Eaton + + * emacs/octave-inf.el, emacs/octave-mod.el: Update to match FSF + sources plus code that will make it work if Emacs doesn't have the + customize code. + +Tue Sep 14 07:57:06 1999 Kurt Hornik + + * emacs/octave-inf.el (inferior-octave-startup): Always pass "-i" + and "--no-line-editing" to Octave subprocess. + (inferior-octave-startup-args): Default to nil. + Mon Sep 6 10:50:10 1999 John W. Eaton * emacs/octave-inf.el (inferior-octave-startup-args): diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -1,6 +1,24 @@ Summary of changes for version 2.1.x: ------------------------------------ + * If you are using GNU Emacs 19.34 or earlier, you will need to add + the following code to your ~/.emacs file in order to use Emacs + Octave mode: + + ;; Set up the custom library. + ;; taken from http://www.dina.kvl.dk/~abraham/custom/ + (eval-and-compile + (condition-case () + (require 'custom) + (error nil)) + (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) + nil ;; We've got what we needed + ;; We have the old custom-library, hack around it! + (defmacro defgroup (&rest args) + nil) + (defmacro defcustom (var value doc &rest args) + (` (defvar (, var) (, value) (, doc)))))) + * When `format +' is in effect, Octave uses the following symbols to provide more information about the values in a matrix: diff --git a/README.mirrors b/README.mirrors --- a/README.mirrors +++ b/README.mirrors @@ -2,12 +2,13 @@ one of those listed below. They mirror the /pub/octave directory on ftp.che.wisc.edu. - site directory - ---- --------- - ftp.eos.hokudai.ac.jp /pub/GNU/misc/octave - ftp.math.uni-hamburg.de /pub/soft/math/octave - ftp.task.gda.pl /pub/software/octave + site directory + ---- --------- + ftp.eos.hokudai.ac.jp /pub/GNU/misc/octave + ftp.math.uni-hamburg.de /pub/soft/math/octave + ftp.task.gda.pl /pub/software/octave ftp.u-aizu.ac.jp /pub/SciEng/numanal/Octave + mirror.aarnet.edu.au /pub/octave The latest Octave sources may also be found on the official Free Software Foundation ftp site, ftp://prep.ai.mit.edu/pub/gnu, which is @@ -21,4 +22,4 @@ University of Wisconsin-Madison Department of Chemical Engineering -Fri Aug 22 15:49:17 1997 +Thu Sep 23 15:44:27 1999 diff --git a/doc/interpreter/arith.texi b/doc/interpreter/arith.texi --- a/doc/interpreter/arith.texi +++ b/doc/interpreter/arith.texi @@ -300,7 +300,17 @@ @node Trigonometry, Sums and Products, Complex Arithmetic, Arithmetic @section Trigonometry -Octave provides the following trigonometric functions: +Octave provides the following trigonometric functions. Angles are +specified in radians. To convert from degrees to radians multipy by +@iftex +@tex +$\pi/180$ +@end tex +@end iftex +@ifinfo +@code{pi/180} +@end ifinfo + (e.g. @code{sin (30 * pi/180)} returns the sine of 30 degrees). @deftypefn {Mapping Function} {} sin (@var{z}) @deftypefnx {Mapping Function} {} cos (@var{z}) diff --git a/libcruft/ChangeLog b/libcruft/ChangeLog --- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,7 @@ +1999-10-01 John W. Eaton + + * dassl/dpotrf.f, dassl/dpotf2.f: Move to lapack subdirectory. + Fri Mar 26 01:19:04 1999 John W. Eaton * Makerules.in (all): Don't try to use a special rule for making diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,26 @@ +Wed Sep 22 22:12:03 1999 A. Scottedward Hodel + + * linear-algebra/krylov.m: Correctly handle case of V having full + rank when V has more columns than rows. + +Mon Sep 20 23:04:57 1999 John W. Eaton + + * general/linspace.m, linear-algebra/pinv.m: Delete. + + * statistics/tests/manova.m: Avoid problems if + whitespace_in_literal_matrix is set to "traditional". + * statistics/tests/t_test_regression.m: Likewise. + * statistics/tests/u_test.m: Likewise. + * statistics/tests/chisquare_test_homogeneity.m: Likewise. + * statistics/tests/anova.m: Likewise. + * statistics/tests/kruskal_wallis_test.m: Likewise. + * statistics/base/statistics.m: Likewise. + * image/saveimage.m: Likewise. + * signal/arch_fit.m: Likewise. + * signal/autoreg_matrix.m: Likewise. + * signal/triangle_lw.m: Likewise. + * strings/dec2hex.m: Likewise. + Thu Sep 9 19:31:58 1999 John W. Eaton * image/saveimage.m: Initialize scale. diff --git a/scripts/image/saveimage.m b/scripts/image/saveimage.m --- a/scripts/image/saveimage.m +++ b/scripts/image/saveimage.m @@ -162,7 +162,7 @@ for i = 1:img_nr idx = (i-1)*img_nc+1:i*img_nc; if (n_long > 0) - img_row = [map(img(idx)); zeros (8-n_long, 1)]; + img_row = [map(img(idx)); (zeros (8-n_long, 1))]; else img_row = map(img(idx)); endif diff --git a/scripts/linear-algebra/krylov.m b/scripts/linear-algebra/krylov.m --- a/scripts/linear-algebra/krylov.m +++ b/scripts/linear-algebra/krylov.m @@ -1,4 +1,4 @@ -# Copyright (C) 1993, 1998, 1999 A. Scottedward Hodel +# Copyright (C) 1993, 1998, 1999 Auburn University. All rights reserved. # # This file is part of Octave. # @@ -19,7 +19,7 @@ function [Uret,H,nu] = krylov(A,V,k,eps1,pflg); # function [U,H,nu] = krylov(A,V,k{,eps1,pflg}); # construct orthogonal basis U of block Krylov subspace; - # [V AV A^2*V ... A^(k+1)*V]; + # [V AV A^2*V ... A^(k+1)*V]; # method used: householder reflections to guard against loss of # orthogonality # eps1: threshhold for 0 (default: 1e-12) @@ -30,14 +30,16 @@ # # outputs: # Uret: orthogonal basis of block krylov subspace - # H: Hessenberg matrix; if V is a vector then A U = U H + # H: Hessenberg matrix; if V is a vector then A U = U H # otherwise H is meaningless # nu: dimension of span of krylov subspace (based on eps1) - # if B is a vector and k > m-1, krylov returns H = the Hessenberg + # if B is a vector and k > m-1, krylov returns H = the Hessenberg # decompostion of A. # - # Reference: Hodel and Misra, "Partial Pivoting in the Computation of - # Krylov Subspaces", In preparation. + # Reference: Hodel and Misra, "Partial Pivoting in the Computation of + # Krylov Subspaces", to be submitted to Linear Algebra and its + # Applications + # written by A. Scottedward Hodel a.s.hodel@eng.auburn.edu defeps = 1e-12; if(nargin < 3 | nargin > 5) @@ -49,11 +51,11 @@ eps1 = defeps; # default tolerance parameter endif if(isempty(eps1)) eps1 = defeps; endif - + na = is_square(A); if( !na ) error("A(%d x %d) must be square",rows(A),columns(A)); endif - - [m,kb] = size(V); + + [m,kb] = size(V); if(m != na); error("A(%d x %d), V(%d x %d): argument dimensions do not match", ... na,na,m,kb) @@ -64,7 +66,7 @@ endif Vnrm = norm(V,Inf); - + # check for trivial solution if(Vnrm == 0) Uret = []; nu = 0; return; @@ -77,7 +79,7 @@ pivot_vec = 1:na; iter = 0; - alpha = []; + alpha = []; nh = 0; while (length(alpha) < na) & (columns(V) > 0) & (iter < k) iter++; @@ -86,7 +88,7 @@ jj = 1; while(jj <= columns(V) & length(alpha) < na) nu = length(alpha)+1; # index of next Householder reflection - + short_pv = pivot_vec(nu:na); q = V(:,jj); short_q = q(short_pv); @@ -94,8 +96,8 @@ if(norm(short_q) < eps1) # insignificant column; delete nv = columns(V); - if(jj != nv) - [V(:,jj),V(:,nv)] = swap(V(:,jj),V(:,nv)); + if(jj != nv) + [V(:,jj),V(:,nv)] = swap(V(:,jj),V(:,nv)); # FIX ME: H columns should be swapped too. Not done since # Block Hessenberg structure is lost anyway. endif @@ -110,7 +112,7 @@ maxv = max(asq); maxidx = find(asq == maxv); pivot_idx = short_pv(maxidx(1)); - + # see if need to change the pivot list if(pivot_idx != pivot_vec(nu)) swapidx = maxidx(1) + (nu-1); @@ -118,7 +120,7 @@ swap(pivot_vec(nu),pivot_vec(swapidx)); endif endif - + # isolate portion of vector for reflection idx = pivot_vec(nu:na); jdx = pivot_vec(1:nu); @@ -139,13 +141,24 @@ endif endwhile + # check for oversize V (due to full rank) + if( ( columns(V) > na ) & ( length(alpha) == na ) ) + # trim to size + V = V(:,1:na); + elseif( columns(V) > na ) + krylov_V = V + krylov_na = na + krylov_length_alpha = length(alpha) + error("This case should never happen; submit bug report."); + endif + if(columns(V) > 0) # construct next Q and multiply Q = zeros(size(V)); for kk=1:columns(Q) Q(pivot_vec(nu-columns(Q)+kk),kk) = 1; endfor - + # apply Householder reflections for ii = nu:-1:1 idx = pivot_vec(ii:na); @@ -178,7 +191,7 @@ U(idx(1),i) = 1; U(idx,i:j1) = U(idx,i:j1)-av*hv*(hv'*U(idx,i:j1)); endfor - + nu = length(alpha); Uret = U; if( max(max( abs(Uret(zidx,:)) )) > 0) diff --git a/scripts/signal/arch_fit.m b/scripts/signal/arch_fit.m --- a/scripts/signal/arch_fit.m +++ b/scripts/signal/arch_fit.m @@ -67,7 +67,7 @@ e = y - X * b; else [b, v_b, e] = ols (y, X); - a = [v_b, zeros (1,p)]'; + a = [v_b, (zeros (1, p))]'; if (nargin < 5) gamma = 0.1; if (nargin < 4) diff --git a/scripts/signal/autoreg_matrix.m b/scripts/signal/autoreg_matrix.m --- a/scripts/signal/autoreg_matrix.m +++ b/scripts/signal/autoreg_matrix.m @@ -38,7 +38,7 @@ y = reshape (y, T, 1); X = ones (T, k+1); for j = 1 : k; - X(:, j+1) = [zeros (j, 1); y(1:T-j)]; + X(:, j+1) = [(zeros (j, 1)); y(1:T-j)]; endfor endfunction diff --git a/scripts/signal/triangle_lw.m b/scripts/signal/triangle_lw.m --- a/scripts/signal/triangle_lw.m +++ b/scripts/signal/triangle_lw.m @@ -25,7 +25,7 @@ function retval = triangle_lw (n, b) retval = 1 - (0 : n-1)' * b; - retval = max ([retval'; zeros (1, n)])'; + retval = max ([retval'; (zeros (1, n))])'; endfunction diff --git a/scripts/statistics/base/statistics.m b/scripts/statistics/base/statistics.m --- a/scripts/statistics/base/statistics.m +++ b/scripts/statistics/base/statistics.m @@ -36,9 +36,13 @@ X = reshape (X, length (X), 1); endif for k=1:columns(X) - S(:,k) = [min (X(:,k)); empirical_inv ([0.25;0.5;0.75], X(:,k)); - max (X(:,k)); mean (X(:,k)); std (X(:,k)); - skewness (X(:,k)); kurtosis (X(:,k))]; + S(:,k) = [(min (X(:,k))); + (empirical_inv ([0.25;0.5;0.75], X(:,k))); + (max (X(:,k))); + (mean (X(:,k))); + (std (X(:,k))); + (skewness (X(:,k))); + (kurtosis (X(:,k)))]; endfor else error ("statistics: invalid argument"); diff --git a/scripts/statistics/tests/anova.m b/scripts/statistics/tests/anova.m --- a/scripts/statistics/tests/anova.m +++ b/scripts/statistics/tests/anova.m @@ -64,7 +64,7 @@ if (k == 1) error ("anova: there should be at least 2 groups"); else - group_label = s ([1, reshape (i, 1, k-1) + 1]); + group_label = s ([1, (reshape (i, 1, k-1) + 1)]); endif for i = 1 : k; v = y (find (g == group_label (i))); diff --git a/scripts/statistics/tests/chisquare_test_homogeneity.m b/scripts/statistics/tests/chisquare_test_homogeneity.m --- a/scripts/statistics/tests/chisquare_test_homogeneity.m +++ b/scripts/statistics/tests/chisquare_test_homogeneity.m @@ -46,7 +46,7 @@ error ("chisquare_test_homogeneity: c must be increasing"); endif - c = [reshape (c, 1, df), Inf]; + c = [(reshape (c, 1, df)), Inf]; l_x = length (x); x = reshape (x, l_x, 1); n_x = sum (x * ones (1, df+1) < ones (l_x, 1) * c); diff --git a/scripts/statistics/tests/kruskal_wallis_test.m b/scripts/statistics/tests/kruskal_wallis_test.m --- a/scripts/statistics/tests/kruskal_wallis_test.m +++ b/scripts/statistics/tests/kruskal_wallis_test.m @@ -48,7 +48,7 @@ endif l = length (x); n = [n, l]; - p = [p, reshape (x, 1, l)]; + p = [p, (reshape (x, 1, l))]; endfor r = ranks (p); diff --git a/scripts/statistics/tests/manova.m b/scripts/statistics/tests/manova.m --- a/scripts/statistics/tests/manova.m +++ b/scripts/statistics/tests/manova.m @@ -61,7 +61,7 @@ if (k == 1) error ("manova: there should be at least 2 groups"); else - group_label = s ([1, reshape (i, 1, k - 1) + 1]); + group_label = s ([1, (reshape (i, 1, k - 1) + 1)]); endif Y = Y - ones (n, 1) * mean (Y); diff --git a/scripts/statistics/tests/t_test_regression.m b/scripts/statistics/tests/t_test_regression.m --- a/scripts/statistics/tests/t_test_regression.m +++ b/scripts/statistics/tests/t_test_regression.m @@ -86,8 +86,7 @@ elseif strcmp (alt, "<") pval = cdf; else - error (["t_test_regression: ", ... - sprintf ("the value %s for alt is not possible", alt)]); + error ("t_test_regression: the value `%s' for alt is not possible", alt); endif if (nargout == 0) diff --git a/scripts/statistics/tests/u_test.m b/scripts/statistics/tests/u_test.m --- a/scripts/statistics/tests/u_test.m +++ b/scripts/statistics/tests/u_test.m @@ -52,7 +52,7 @@ n_x = length (x); n_y = length (y); - r = ranks ([reshape (x, 1, n_x), reshape (y, 1, n_y)]); + r = ranks ([(reshape (x, 1, n_x)), (reshape (y, 1, n_y))]); z = (sum (r(1 : n_x)) - n_x * (n_x + n_y + 1) / 2) ... / sqrt (n_x * n_y * (n_x + n_y + 1) / 12); diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Thu Sep 23 19:49:36 1999 John W. Eaton + + * toplev.cc (Fsystem): For async case, use execl instead of + system, avoiding the need to exit after executing the subprocess. + Thu Sep 9 17:09:23 1999 John W. Eaton * oct-stream.cc (get_size): Allow zero values. diff --git a/src/toplev.cc b/src/toplev.cc --- a/src/toplev.cc +++ b/src/toplev.cc @@ -425,9 +425,12 @@ error ("system: fork failed -- can't create child process"); else if (pid == 0) { - system (cmd_str.c_str ()); - exit (0); - retval(0) = 0.0; + // XXX FIXME XXX -- should probably replace this + // call with something portable. + + execl ("/bin/sh", "sh", "-c", cmd_str.c_str (), 0); + + panic_impossible (); } else retval(0) = static_cast (pid); diff --git a/src/version.h b/src/version.h --- a/src/version.h +++ b/src/version.h @@ -23,7 +23,7 @@ #if !defined (octave_version_h) #define octave_version_h 1 -#define OCTAVE_VERSION "2.1.14" +#define OCTAVE_VERSION "2.1.15" #define OCTAVE_COPYRIGHT \ "Copyright (C) 1996, 1997, 1998 John W. Eaton."