Mercurial > hg > octave-nkf
changeset 10460:4975d63bb2df
cell2mat.m: Add test for cells of cells.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Thu, 25 Mar 2010 07:40:27 -0400 |
parents | 20ce1bea653d |
children | 81067c72361f |
files | scripts/ChangeLog scripts/general/cell2mat.m |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-03-25 Ben Abbott <bpabbot@mac.com> + + * /general/cell2mat.m: Add test for cells of cells. + 2010-03-24 Petr Mikulik <mikulik@physics.muni.cz> * plot/__go_draw_axes__.m: Unset logscale also for unused gnuplot
--- a/scripts/general/cell2mat.m +++ b/scripts/general/cell2mat.m @@ -98,6 +98,9 @@ %! m = int8 (256*rand (4, 5, 6, 7, 8)); %! c = mat2cell (m, [1 2 1], [1 2 2], [3 1 1 1], [4 1 2], [3 1 4]); %! assert (cell2mat (c), m) +%!test +%! m = {1, 2, 3}; +%! assert (cell2mat (mat2cell (m, 1, [1 1 1])), m); ## Demos %!demo %! C = {[1], [2 3 4]; [5; 9], [6 7 8; 10 11 12]};