function strmat=mkstrmat(instr)

% strmat takes a simple input string which contains line feeds '\n',
%  and creates a string matrix of the individual lines.
%  Uneven lines are padded to make the string matrix.
%
% begun 4 April 1999 by paul hemenway
%

% The preceeding blank line is important for cvs.
% $Id: mkstrmat.m,v 1.4 1999/05/26 20:59:23 paul Exp $
%

% $Log: mkstrmat.m,v $
% Revision 1.4  1999/05/26 20:59:23  paul
%
%
% Fixed 'em up.  -- dbyrne 99/05/26
%
% Revision 1.3  1999/05/25 15:33:43  paul
% add cvs logging and id lines ...   phemenway
%


i = findstr(instr,setstr(10));
i = [0 i];
strmat='';
ssn=[];

%check for a simple string:
   if (size(instr,1)~=1) | (~isstr(instr))
     dodsmsg('you have not input a simple string. please try again.')
     return
   end

for j=1:length(i)-1
  istr = instr(i(j)+1:i(j+1)-1);
  strmat = str2mat(strmat,istr);
end
strmat  = strmat(2:size(strmat,1),:);
return
