Mu Analysis and Synthesis Toolbox | ![]() ![]() |
Format output of matrix to screen
Syntax
Description
mprintf
displays a matrix in formatted form. The optional 'format'
specifies the format exactly as in the MATLAB function sprintf
. If no 'format'
is specified the default is '%.1e'.
This routine is primarily for use in seesys
and does not work well for f
format when the minimum field width is too small. There is no input checking, so you can wreak havoc if you use mprintf
incorrectly. See sprintf
for more details. The optional 'end of line characters'
is exactly what it says. The default is the newline C escape sequence (\n
). To get no newline at the end of each line use mprintf(matin,'format',[]).
Examples
The mprintf
command displays any type of matrix. An example of its use for SYSTEM and VARYING matrices follows:
mprintf(m
) 1.7e+01 8.7e+00 -6.4e+00 -1.3e+01 5.9e-01 -1.4e+01 5.8e+00 -1.3e+01 1.8e+01 -7.0e+00 -3.6e+00 9.8e+00 2.6e+00 1.2e+01 -1.4e+00 -4.5e-01 mprintf(m
,'%6.2f ') 16.96 8.72 -6.39 -13.49 0.59 -14.46 5.77 -12.70 17.97 -7.01 -3.60 9.85 2.64 12.46 -1.36 -0.45 mprintf (m
, '%3.f ') 17 9 -6 -13 1 -14 6 -13 18 -7 -4 10 3 12 -1 -O
See Also
fprintf
, rifd
, see
, seesys
, sprintf
![]() | mmult | msf, msfbatch | ![]() |