%% Determine Matrix

M = rand(3,3,3);
ismatrix(M)

%

N = M(:,:);
ismatrix(N)

% Copyright 2012 The MathWorks, Inc.