(1)disp
Display text or array
Syntax:
disp(X)
Description:
disp(X) displays an array, without printing the array name. If X
contains a text string, the string is displayed.
Another way to display an array on the screen is to type its
name, but this prints a leading "X =," which is not always
desirable.
Note that disp does not display empty arrays.
(2)sprintf
Write formatted data to string
Syntax:
[s, errmsg] = sprintf(format, A, ...)
Description:[s, errmsg] = sprintf(format,
A, ...) formats the data in matrix A (and in any additional matrix
arguments) under control of the specified format string and returns
it in the MATLAB string variable s. The sprintf function returns an
error message string errmsg if an error occurred. errmsg is an
empty matrix if no error occurred.
sprintf is the same as fprintf except that it returns the data
in a MATLAB string variable rather than writing it to a file.