Mercurial > octave-nkf
comparison scripts/general/cell2mat.m @ 5716:7f79a99e273e
[project @ 2006-03-24 16:56:09 by jwe]
author | jwe |
---|---|
date | Fri, 24 Mar 2006 16:56:09 +0000 |
parents | 2618a0750ae6 |
children | 067948dc39bf |
comparison
equal
deleted
inserted
replaced
5715:edf82d02be75 | 5716:7f79a99e273e |
---|---|
67 %! C = {[1], [2 3 4]; [5; 9], [6 7 8; 10 11 12]}; | 67 %! C = {[1], [2 3 4]; [5; 9], [6 7 8; 10 11 12]}; |
68 %! D = C; D(:,:,2) = C; | 68 %! D = C; D(:,:,2) = C; |
69 %! E = [1 2 3 4; 5 6 7 8; 9 10 11 12]; | 69 %! E = [1 2 3 4; 5 6 7 8; 9 10 11 12]; |
70 %! F = E; F(:,:,2) = E; | 70 %! F = E; F(:,:,2) = E; |
71 %!assert (cell2mat (C), E); | 71 %!assert (cell2mat (C), E); |
72 %!test | 72 %!assert (cell2mat (D), F); |
73 %! if ([1e6,1e4,1] * str2num (split (version, '.')) > 2010064) | |
74 %! assert (cell2mat (D), F); % crashes octave 2.1.64 | |
75 %! endif | |
76 ## Demos | 73 ## Demos |
77 %!demo | 74 %!demo |
78 %! C = {[1], [2 3 4]; [5; 9], [6 7 8; 10 11 12]}; | 75 %! C = {[1], [2 3 4]; [5; 9], [6 7 8; 10 11 12]}; |
79 %! cell2mat (C) | 76 %! cell2mat (C) |