%--------------------------------------------------------- % % Example showing how to partition a matrix of values into % subblocks. Notice the use of "whos" here could be % replaced using the class() function for the single % variable whose type and size are of interest. % %--------------------------------------------------------- echo on; A = 10*[1:12]'*[1:6] disp('Hit return to continue'); pause blockA = mat2cell(A, [2 6 4], [4 2]) whos disp('Hit return to continue'); pause v = blockA(1,2) whos OneTwoBlock = v{:} whos echo off;