<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<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"
          xmlns:scilab="http://www.scilab.org" xml:id="bin2dec" xml:lang="ja">
    <refnamediv>
        <refname>bin2dec</refname>
        <refpurpose>2進表現を整数に変換</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>呼び出し手順</title>
        <synopsis>y=bin2dec(str)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>引数</title>
        <variablelist>
            <varlistentry>
                <term>str</term>
                <listitem>
                    <para>
                        文字 '1' および '0'のみを含む文字列の行列
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>y</term>
                <listitem>
                    <para>double行列,正の整数値</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>説明</title>
        <para>
            2進文字列<literal>str</literal> を指定すると, この関数は,
            その2進表現が<literal>str</literal>となるような
            10進数 <literal>y</literal> を返します.
            ( <literal>y</literal> と
            <literal>str</literal> の大きさは同じになります).
        </para>
    </refsection>
    <refsection>
        <title>例</title>
        <programlisting role="example"><![CDATA[
// example 1 :
// '1010110' : is the binary representation of 86
str='1010110';
y=bin2dec(str)

// example 2 :
// '1011011' : is the binary representation of 91
// '1010010' : is the binary representation of 82
str=['1011011'; '1010010']
y=bin2dec(str)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>参照</title>
        <simplelist type="inline">
            <member>
                <link linkend="base2dec">base2dec</link>
            </member>
            <member>
                <link linkend="oct2dec">oct2dec</link>
            </member>
            <member>
                <link linkend="hex2dec">hex2dec</link>
            </member>
            <member>
                <link linkend="dec2bin">dec2bin</link>
            </member>
            <member>
                <link linkend="bitstring">bitstring</link>
            </member>
        </simplelist>
    </refsection>
</refentry>