0001 function y=nt_squeeze_all(x)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 VERBOSE=1;
0012
0013 x=squeeze(x);
0014
0015 if isnumeric (x)
0016 y=x;
0017 return;
0018 elseif iscell(x);
0019 if VERBOSE; disp('cell to matrix'); end
0020 try
0021 y=cell2mat(x);
0022 catch
0023 error('could not convert cell array to matrix');
0024 end
0025 elseif isstruct(x);
0026 if VERBOSE; disp('struct to cell'); end
0027 try
0028 y=struct2cell(x);
0029 catch
0030 error('could not convert structure to cell array');
0031 end
0032 else
0033 error('!');
0034 end
0035
0036 y=nt_squeeze_all(y);