e.g i have variable data that containt matrix like these ;
a1 b1 c1
a2 b2 c2
a3 b3 c3
and i wanted it stored like :
a1
a2
a3
b1
b2
b3
c1
c2
c3
I use looping
inc=1; [s1,s2]=size(data); for x=1:s2 for y=1:s1 dataStored(inc)=data(y,x); inc=inc+1; end end
It's work, but on a very large amount of data like data < 512×3671 int 16 > take endless time to wait. Is there any way simple to do that? Or maybe my code is wrong ?
Best Answer