Mercurial > octave
changeset 22215:a4551d2b5da5
repmat.m: add test for input with zero length dimensions.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Sun, 07 Aug 2016 04:18:18 +0100 |
parents | 1723063e65f3 |
children | f99c0b8cb67b |
files | scripts/general/repmat.m |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/repmat.m Sat Aug 06 05:18:34 2016 +0100 +++ b/scripts/general/repmat.m Sun Aug 07 04:18:18 2016 +0100 @@ -204,6 +204,9 @@ %!assert (size (repmat (1, [0, 1])), [0, 1]) %!assert (size (repmat (1, [0, 5])), [0, 5]) +%!assert (size (repmat (ones (0, 3), [2 3])), [0 9]) +%!assert (size (repmat (ones (0, 0, 3), [2 3])), [0 0 3]) + %!shared x %! x = struct ("a", [], "b", []); %!assert (size (repmat (x, [1, 0])), [1, 0]) @@ -217,4 +220,3 @@ %!assert (size (repmat ({1}, [0, 5])), [0, 5]) %!error (size (repmat (".", -1, -1))) -