.. highlightlang:: us .. _smprintf: smprintf ======== .. index:: smprintf .. us.tag smprintf ENGLISH STR Programming.Convert New300 :ref:`smprintf` formats a double or string matrix and returns the data as a scalar string or string matrix. .. function:: smBuffer = smprintf(ssFormat, mValues) ssBuffer = smprintf(ssFormat, mValues, ssColSep, ssLineSep) .. us.return **Return Value** *ssBuffer* is a scalar string containing the result of the conversion. If called with two parameters the function returns a string matrix >*smBuffer*. .. us.params **Parameters** .. uparam:: ssFormat *ssFormat* is a scalar string with embedded formatting symbols. It specifies how the arguement *mValues* are formatted. The parameter is described in the function :ref:`printf`. .. uparam:: mValues *mValue* is a double or string matrix. .. uparam:: ssColSep *ssColSep* is a scalar string that is used to separate the columns. Example: ``\t`` is a tab charater or a comma ``,``. .. uparam:: ssLineSep *ssLineSep* is a scalar string that is used to separate the rows. Example: ``\n`` is a new line character. .. us.comment **Comment** If called with two parameters the function returns a matix of the same size as the matrix *mValues*. .. us.example **Example** :: * a = [1,2,3;4,7.987,6] * smprintf("%10.3lf", a, "\t", "\n"); 1.000 2.000 3.000 4.000 7.987 6.000 .. seealso:: :ref:`printf`, :ref:`fprintf`, :ref:`strtod` :sub:`id-1625601`