Mercurial > hg > octave-terminal
changeset 7418:42b70df74c21
[project @ 2008-01-25 07:19:27 by jwe]
author | jwe |
---|---|
date | Fri, 25 Jan 2008 07:19:27 +0000 |
parents | 33577b0d4df2 |
children | f62fb98f1da2 |
files | scripts/ChangeLog scripts/geometry/griddata3.m scripts/linear-algebra/trace.m |
diffstat | 3 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +2008-01-25 Thomas Weber <thomas.weber.mail@gmail.com> + + * linear-algebra/trace.m: Test cases for non 2-d args. + +2008-01-25 James Packer <james.packer@wadh.ox.ac.uk> + + * geometry/griddata3.m: Call griddata, not gridata. + 2008-01-24 Schloegl Alois <alois.schloegl@tugraz.at> * linear-algebra/trace.m: Require 2-d args. Handle vectors properly.
--- a/scripts/geometry/griddata3.m +++ b/scripts/geometry/griddata3.m @@ -51,7 +51,7 @@ error ("griddata: xi, yi and zi must be vectors or matrices of same size"); endif - vi = gridata ([x(:), y(:), z(:)], v(:), [xi(:), yi(:), zi(:)], varargin{:}); + vi = griddata ([x(:), y(:), z(:)], v(:), [xi(:), yi(:), zi(:)], varargin{:}); vi = reshape (vi, size (xi)); endfunction
--- a/scripts/linear-algebra/trace.m +++ b/scripts/linear-algebra/trace.m @@ -45,6 +45,9 @@ %!assert(trace ([1, 2; 3, 4]) == 5); %!assert(trace ([1, 2; 3, 4; 5, 6]) == 5); %!assert(trace ([1, 3, 5; 2, 4, 6]) == 5); +%!assert(trace ([]), 0); +%!assert(trace (randn(1,0)), 0); +%! %!error trace (); %!error trace (1, 2); - +%!error <only valid on 2-D objects> trace(reshape(1:9,[1,3,3]));