changeset 2798:d477bceb9e2a

[project @ 1997-03-08 05:08:12 by jwe]
author jwe
date Sat, 08 Mar 1997 05:09:11 +0000
parents f81117f4754d
children d77a29e4387f
files liboctave/CMatrix.cc scripts/ChangeLog scripts/statistics/corrcoef.m
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/CMatrix.cc
+++ b/liboctave/CMatrix.cc
@@ -3760,7 +3760,7 @@
 	    if (is)
 	      a.elem (i, j) = tmp;
 	    else
-	      return;
+	      return is;
 	  }
     }
 
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,6 +1,10 @@
+Fri Mar  7 23:06:48 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* statistics/corrcoef.m: Make it actually work.
+
 Thu Mar  6 12:36:30 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
-	* statistics/corrcoef.m: Don't fail if single argument is a vector.
+	* statistics/corrcoef.m: Don't fail if single argument is a matrix.
 
 Sat Mar  1 15:23:14 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
--- a/scripts/statistics/corrcoef.m
+++ b/scripts/statistics/corrcoef.m
@@ -42,7 +42,7 @@
   elseif (nargin == 1)
     c = cov (x);
     s = reshape (sqrt (diag (c)), 1, columns (c));
-    retval = c ./ sqrt (s * s');
+    retval = c ./ (s' * s);
   endif
 
 endfunction