~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/elementary_functions/help/en_US/integer_representation/bin2dec.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 *
13
13
 -->
14
14
<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="bin2dec" xml:lang="en">
15
 
  <refnamediv>
16
 
    <refname>bin2dec</refname>
17
 
    <refpurpose>convert from binary to decimal</refpurpose>
18
 
  </refnamediv>
19
 
  <refsynopsisdiv>
20
 
    <title>Calling Sequence</title>
21
 
    <synopsis>y=bin2dec(str)</synopsis>
22
 
  </refsynopsisdiv>
23
 
  <refsection>
24
 
    <title>Arguments</title>
25
 
    <variablelist>
26
 
      <varlistentry>
27
 
        <term>str</term>
28
 
        <listitem>
29
 
          <para>a matrix of strings containing only
30
 
            characters '1' and '0'
31
 
          </para>
32
 
        </listitem>
33
 
      </varlistentry>
34
 
      <varlistentry>
35
 
        <term>y</term>
36
 
        <listitem>
37
 
          <para>a matrix of doubles, positive integer values</para>
38
 
        </listitem>
39
 
      </varlistentry>
40
 
    </variablelist>
41
 
  </refsection>
42
 
  <refsection>
43
 
    <title>Description</title>
44
 
    <para>
45
 
      Given <literal>str</literal> a binary string, this function returns
46
 
      <literal>y</literal> the decimal number whose the binary representation is
47
 
      given by <literal>str</literal> ( <literal>y</literal> and
48
 
      <literal>str</literal> have the same size).
49
 
    </para>
50
 
  </refsection>
51
 
  <refsection>
52
 
    <title>Examples</title>
53
 
    <programlisting role="example"><![CDATA[ 
 
15
    <refnamediv>
 
16
        <refname>bin2dec</refname>
 
17
        <refpurpose>convert from binary to decimal</refpurpose>
 
18
    </refnamediv>
 
19
    <refsynopsisdiv>
 
20
        <title>Calling Sequence</title>
 
21
        <synopsis>y=bin2dec(str)</synopsis>
 
22
    </refsynopsisdiv>
 
23
    <refsection>
 
24
        <title>Arguments</title>
 
25
        <variablelist>
 
26
            <varlistentry>
 
27
                <term>str</term>
 
28
                <listitem>
 
29
                    <para>a matrix of strings containing only
 
30
                        characters '1' and '0'
 
31
                    </para>
 
32
                </listitem>
 
33
            </varlistentry>
 
34
            <varlistentry>
 
35
                <term>y</term>
 
36
                <listitem>
 
37
                    <para>a matrix of doubles, positive integer values</para>
 
38
                </listitem>
 
39
            </varlistentry>
 
40
        </variablelist>
 
41
    </refsection>
 
42
    <refsection>
 
43
        <title>Description</title>
 
44
        <para>
 
45
            Given <literal>str</literal> a binary string, this function returns
 
46
            <literal>y</literal> the decimal number whose the binary representation is
 
47
            given by <literal>str</literal> ( <literal>y</literal> and
 
48
            <literal>str</literal> have the same size).
 
49
        </para>
 
50
    </refsection>
 
51
    <refsection>
 
52
        <title>Examples</title>
 
53
        <programlisting role="example"><![CDATA[ 
54
54
// example 1 :
55
55
// '1010110' : is the binary representation of 86 
56
56
str='1010110';
62
62
str=['1011011'; '1010010']
63
63
y=bin2dec(str)
64
64
 ]]></programlisting>
65
 
  </refsection>
66
 
  <refsection role="see also">
67
 
    <title>See Also</title>
68
 
    <simplelist type="inline">
69
 
      <member>
70
 
        <link linkend="base2dec">base2dec</link>
71
 
      </member>
72
 
      <member>
73
 
        <link linkend="oct2dec">oct2dec</link>
74
 
      </member>
75
 
      <member>
76
 
        <link linkend="hex2dec">hex2dec</link>
77
 
      </member>
78
 
      <member>
79
 
        <link linkend="dec2bin">dec2bin</link>
80
 
      </member>
81
 
      <member>
82
 
        <link linkend="dec2oct">dec2oct</link>
83
 
      </member>
84
 
      <member>
85
 
        <link linkend="dec2hex">dec2hex</link>
86
 
      </member>
87
 
    </simplelist>
88
 
  </refsection>
 
65
    </refsection>
 
66
    <refsection role="see also">
 
67
        <title>See Also</title>
 
68
        <simplelist type="inline">
 
69
            <member>
 
70
                <link linkend="base2dec">base2dec</link>
 
71
            </member>
 
72
            <member>
 
73
                <link linkend="oct2dec">oct2dec</link>
 
74
            </member>
 
75
            <member>
 
76
                <link linkend="hex2dec">hex2dec</link>
 
77
            </member>
 
78
            <member>
 
79
                <link linkend="dec2bin">dec2bin</link>
 
80
            </member>
 
81
            <member>
 
82
                <link linkend="dec2oct">dec2oct</link>
 
83
            </member>
 
84
            <member>
 
85
                <link linkend="dec2hex">dec2hex</link>
 
86
            </member>
 
87
        </simplelist>
 
88
    </refsection>
89
89
</refentry>