Home > sp > showmatrix.m

showmatrix

PURPOSE ^

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

SYNOPSIS ^

function [void] = showmatrix(M)

DESCRIPTION ^

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Mon 17-Mar-2008 10:33:42 by m2html © 2003