CS 205 Computational Programming and Visualization MATLAB Low Level I/O Formatting MATLAB help documentation refers the reader to "a C Manual" for the details on the data specifiers d, i, o, u, x, X, f, e, E, g, G, c, and s This handout provides the needed details on these specifiers taken from "Using ANSI C in Unix", by Werner Feibel, McGraw Hill, 1990, pp. 573-. d,i (signed) integer o,u,x,X display an unsigned integer value in o = octal u = decimal x = hexidecimal using 0 1 2 3 4 5 6 7 8 9 a b c d e f X = hexidecimal using 0 1 2 3 4 5 6 7 8 9 A B C D E F c unsigned character (for single characters) s string, an array of char (not to include NULL \0 terminator) f floating point value (fixed point decimal) e,E floating point value (scientific notation) e = use e+4 for exponent E = use E+4 for exponent g,G floating point value displayed either as fixed point decimal (f) or scientific notation (e), whichever is shorter. These types can be prefixed to indicate whether a "long" or "short" version should be used: h can precede d i o u x X interpret as "short" l can precede d i o u x X e E f g G interpret as "long" or "double" You can be more specific about the precise number of digit to use to display integers and floating point numbers. ' x = %4.1f feet\n' is the format specifier for fixed point number using 4 characters with one digit past the decial point '%*d\n' expects one value for the field width for the integer '%*.*d\n' expects two values for field width and precision followed by the integer variable to be printed (will be padded with leading zeros to fill the field) '%*.*f\n' precision refers to number digits past the decimal point in scientific notation for the floating point variable to be printed You can control the position in the output with \t tab \n new line