Mercurial > hg > octave-nkf
diff scripts/deprecated/intersection.m @ 7411:83a8781b529d
[project @ 2008-01-22 21:52:25 by jwe]
author | jwe |
---|---|
date | Tue, 22 Jan 2008 21:52:26 +0000 |
parents | a1dbe9d80eee |
children | 8e5371d47da6 |
line wrap: on
line diff
--- a/scripts/deprecated/intersection.m +++ b/scripts/deprecated/intersection.m @@ -28,3 +28,14 @@ y = intersect (varargin{:}); endfunction + +%!assert(all (all (intersection ([1, 2, 3], [2, 3, 5]) == [2, 3]))); + +%!assert(all (all (intersection ([1; 2; 3], [2, 3, 5]) == [2, 3]))); + +%!assert(isempty (intersection ([1, 2, 3], [4; 5; 6]))); + +%!error intersection (1); + +%!error intersection (1, 2, 5); +