Scilab Function

mfprintf - converts, formats, and writes data to a file

mprintf - converts, formats, and writes data to the main scilab window

msprintf - converts, formats, and writes data in a string

Calling Sequence

mfprintf(fd,format,a1,...,an);
mprintf(format,a1,...,an);
str=msprintf(format,a1,...,an);

Parameters

Description

The mprintf, mfprintf, and msprintf functions are interface for C-coded version of printf, fprintf and sprintf functions.

The mprintf function writes formatted operands to the standard Scilab output (i.e the Scilab window). The argument operands are formatted under control of the format operand.

The mfprintf function writes formatted operands to the file specified by the file desciptor fd. The argument operands are formatted under control of the format operand.

The msprintf writes formatted operands in its returned value (a Scilab string). The argument operands are formatted under control of the format operand. Note that, in this case, the escape sequences ("\n, \t,..") are treated as a normal sequence of characters.

All these functions may be used to output column vectors of numbers and string vectors without an explicit loop on the elements. In that case these functions iterates on the rows. The shortest vector gives the number of time the format has to be iterated.

An homogeneous sequence of identical type parameters can be replaced by a matrix

Examples

See Also