function prntmx(nm,m,s,d)
% function prntmx(nm,m,s,d)  prints matrix in fixed format
% Prints 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 points.
%Example: m=[9 6 -2 -3;2.75 2.5 -1 1.25;3.75 2.5 -1 -.75];
%         prntmx('Here is your matrix',m,10,2)
disp(nm)
fm=['%',num2str(s),'.',num2str(d),'f'];
fm1=['%',num2str(s),'.0f'];
[r,c]=size(m);
fprintf('row/col ')
for k=1:c
   fprintf(fm1,k)
end
fprintf('\n')
for j=1:r
   fprintf('%4.0f     ',j)
   for k=1:c
      fprintf(fm,m(j,k))
   end
   fprintf('\n')
end
