13
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="dec2base" xml:lang="en">
15
<refname>dec2base</refname>
16
<refpurpose>Convert decimal to base N number in string</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>str = dec2base(d, base)</synopsis>
21
<synopsis>str = dec2base(d, base, n)</synopsis>
24
<title>Arguments</title>
29
<para>matrix of strings corresponding to "base" representation</para>
35
<para>1-by-1 matrix of doubles, positive integer value, the base</para>
41
<para>matrix of doubles, positive integer values</para>
47
<title>Description</title>
49
<literal>str = dec2base(d, base)</literal> converts the nonnegative integer values of <literal>d</literal> to the specified base <literal>base</literal>.
52
<literal>d</literal> must have a nonnegative integers smaller than 2^52, and <literal>base</literal> must be an integer between 2 and 36.
55
The returned argument <literal>str</literal> is a matrix of strings.
58
<literal>str = dec2base(d, base, n)</literal> produces a representation with at least <literal>n</literal> digits.
62
<title>Examples</title>
63
<programlisting role="example"><![CDATA[
15
<refname>dec2base</refname>
16
<refpurpose>Convert decimal to base N number in string</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>str = dec2base(d, base)</synopsis>
21
<synopsis>str = dec2base(d, base, n)</synopsis>
24
<title>Arguments</title>
29
<para>matrix of strings corresponding to "base" representation</para>
35
<para>1-by-1 matrix of doubles, positive integer value, the base</para>
41
<para>matrix of doubles, positive integer values</para>
47
<title>Description</title>
49
<literal>str = dec2base(d, base)</literal> converts the nonnegative integer values of <literal>d</literal> to the specified base <literal>base</literal>.
52
<literal>d</literal> must have a nonnegative integers smaller than 2^52, and <literal>base</literal> must be an integer between 2 and 36.
55
The returned argument <literal>str</literal> is a matrix of strings.
58
<literal>str = dec2base(d, base, n)</literal> produces a representation with at least <literal>n</literal> digits.
62
<title>Examples</title>
63
<programlisting role="example"><![CDATA[
65
65
disp( dec2base(666, b) )
67
67
]]></programlisting>
69
<refsection role="see also">
70
<title>See Also</title>
71
<simplelist type="inline">
73
<link linkend="base2dec">base2dec</link>
76
<link linkend="bin2dec">bin2dec</link>
79
<link linkend="oct2dec">oct2dec</link>
82
<link linkend="hex2dec">hex2dec</link>
85
<link linkend="dec2bin">dec2bin</link>
88
<link linkend="dec2oct">dec2oct</link>
91
<link linkend="dec2hex">dec2hex</link>
96
<title>History</title>
99
<revnumber>5.4.0</revnumber>
100
<revremark>This function was added in Scilab 5.4.0</revremark>
69
<refsection role="see also">
70
<title>See Also</title>
71
<simplelist type="inline">
73
<link linkend="base2dec">base2dec</link>
76
<link linkend="bin2dec">bin2dec</link>
79
<link linkend="oct2dec">oct2dec</link>
82
<link linkend="hex2dec">hex2dec</link>
85
<link linkend="dec2bin">dec2bin</link>
88
<link linkend="dec2oct">dec2oct</link>
91
<link linkend="dec2hex">dec2hex</link>
96
<title>History</title>
99
<revnumber>5.4.0</revnumber>
100
<revremark>This function was added in Scilab 5.4.0</revremark>