function A = rm12(A)
%RM12  Removes first two leading singleton dimensions
%
%  If SIZE(A,1)==1 and SIZE(A,2)==1, then B = RM12(A)
%  removes the first two singleton dimensions of A.
%  A must be a DOUBLE or CELL.

% Copyright 2003-2004 The MathWorks, Inc.
if isa(A,'double') || isa(A,'cell')
   sza = size(A);
   if length(sza)==3 && sza(1)==1 && sza(2)==1
      A = reshape(A,[sza(3) 1]);
   elseif  length(sza)>3 && sza(1)==1 && sza(2)==1
      A = reshape(A,[sza(3:end)]);
   end
else  
   error('Input to rm12 must be a double or cell');
end 
