function co=charmx(m,s,d)
% charmx	- Makes a character array of the matrix m in fixed format
% function co=charmx(m,s,d)
% Makes a character array of the matrix m in fixed format.
% nm is the name of the matrix
% s is the space used by each number
% d is the number of decimal places
%Example: m=[9 6 -2 -3;2.75 2.5 -1 1.25;3.75 2.5 -1 -.75];
%         charmx(m,10,2)
fm=['%',num2str(s),'.',num2str(d),'f'];
co=[];
[r,c]=size(m);
for j=1:r
   c1=[];
   for k=1:c
      c2=cext(sprintf(fm,m(j,k)),s);
      c1=[c1,c2(1:s)];
   end
   co=[co;c1];
end
