<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>mtlb_num2str</TITLE>
  <TYPE>M2SCI function</TYPE>
  <DATE>July 2004</DATE>

  <SHORT_DESCRIPTION name="mtlb_num2str">Matlab num2str emulation function</SHORT_DESCRIPTION>

  <DESCRIPTION>

    <P>Matlab <VERB>num2str</VERB> and Scilab equivalents (<VERB>string</VERB>, <VERB>msprintf</VERB>) behave differently in some particular cases:</P>

    <DESCRIPTION_INDENT>
    <DESCRIPTION_ITEM>
    <ITEMIZE>
      <ITEM>
        <SP>
        With two input parameters, the second giving precision: There is no Scilab equivalent function, but
	<VERB>msprintf</VERB> can be used to emulate.
        </SP>
      </ITEM>

      <ITEM>
        <SP>
        With two input parameters, the second giving format: Scilab equivalent for Matlab 
	<VERB>num2string(a,format)</VERB> is <VERB>msprintf(format,a)</VERB>.
        </SP>
      </ITEM>
    </ITEMIZE>
    </DESCRIPTION_ITEM>
    </DESCRIPTION_INDENT>

    <P>
    The function <VERB>mtlb_num2str(x,f)</VERB> is used by
    <VERB>mfile2sci</VERB> to replace <VERB>num2str(x,f)</VERB> when it was not
    possible to know what were the inputs while porting Matlab code to Scilab. This function will
    determine the correct semantic at run time. If you want to have a
    more efficient code it is possible to replace <VERB>mtlb_num2str</VERB> calls:
    </P>

    <DESCRIPTION_INDENT>
    <DESCRIPTION_ITEM>
    <ITEMIZE>
      <ITEM>
        <SP>
        If <VERB>f</VERB> is a character string
        <VERB>mtlb_num2str(x,f)</VERB> may be replaced by <VERB>msprintf(f,x)</VERB>
        </SP>
      </ITEM>
    </ITEMIZE>
    </DESCRIPTION_ITEM>
    </DESCRIPTION_INDENT>

    <P>Caution: <VERB>mtlb_num2str</VERB> has not to be used for hand coded functions.</P>

  </DESCRIPTION>

  <SEE_ALSO>
    <SEE_ALSO_ITEM> <LINK>string</LINK> </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM> <LINK>msprintf</LINK> </SEE_ALSO_ITEM>
  </SEE_ALSO>

  <AUTHORS>
    <AUTHORS_ITEM>V.C.</AUTHORS_ITEM>
  </AUTHORS>
</MAN>
