matlab - Convert 3D array to cell of 2D arrays -


i use octave, matlab users helpful.

i have an array defined in space m x n , in time, t. therefore has size m x n x t. function, more helpful convert 3d dimension cell following structure:

consider a m x n x t array.

cell = {a(:,:,1), a(:,:,2), ..., a(:,:,t)}, has t element, each element m x n array.

i don't know how dynamic t.

you can use mat2cell achieve it:

[m n t] = size(a); b=mat2cell(a, m, n, ones(1,t)); 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -