Mercurial > hg > octave-terminal
changeset 1724:a45e88743238
[project @ 1996-01-09 06:19:59 by jwe]
author | jwe |
---|---|
date | Tue, 09 Jan 1996 06:19:59 +0000 |
parents | ab9a2880b6c5 |
children | 59ee9a58f80e |
files | scripts/statistics/std.m |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/statistics/std.m +++ b/scripts/statistics/std.m @@ -38,9 +38,7 @@ n = length (a); retval = sqrt (sumsq (a - mean (a)) / (n - 1)); elseif (nr > 1 && nc > 0) - tmp = mean (a); - tmp = tmp (ones (nr, 1), :); - retval = sqrt (sumsq (a - tmp) / (nr - 1)); + retval = sqrt (sumsq (a - ones (nr, 1) * mean (a)) / (nr - 1)); else error ("std: invalid matrix argument"); endif