


showmatrix.m displays a matrix, no matter how wide it is. It can be edited to change the number of decimal places shown.


0001 % showmatrix.m displays a matrix, no matter how wide it is. It can be edited to change the number of decimal places shown. 0002 0003 function [void] = showmatrix(M) 0004 s=size(M); 0005 for j=1:s(1), 0006 for k=1:s(2), 0007 fprintf(' %7.4f', M(j,k)); % print with 4 decimal places 0008 end 0009 fprintf('\n'); % character return 0010 end 0011 fprintf('\n'); % character return