1 <?xml version="1.0" encoding="UTF-8"?>
4 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5 * Copyright (C) 2008 - INRIA
7 * Copyright (C) 2012 - 2016 - Scilab Enterprises
9 * This file is hereby licensed under the terms of the GNU GPL v2.0,
10 * pursuant to article 5.3.4 of the CeCILL v.2.1.
11 * This file was originally licensed under the terms of the CeCILL v2.1,
12 * and continues to be available under such terms.
13 * For more information, see the COPYING file which you should have received
14 * along with this program.
18 <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">
22 <refname>bin2dec</refname>
24 <refpurpose>2進表現を整数に変換</refpurpose>
32 <synopsis>y=bin2dec(str)</synopsis>
50 文字 '1' および '0'のみを含む文字列の行列
64 <para>double行列,正の整数値</para>
80 2進文字列<literal>str</literal> を指定すると, この関数は,
82 その2進表現が<literal>str</literal>となるような
84 10進数 <literal>y</literal> を返します.
86 ( <literal>y</literal> と
88 <literal>str</literal> の大きさは同じになります).
98 <programlisting role="example"><![CDATA[
100 // '1010110' : is the binary representation of 86
104 // '1011011' : is the binary representation of 91
105 // '1010010' : is the binary representation of 82
106 str=['1011011'; '1010010']
112 <refsection role="see also">
116 <simplelist type="inline">
120 <link linkend="base2dec">base2dec</link>
126 <link linkend="oct2dec">oct2dec</link>
132 <link linkend="hex2dec">hex2dec</link>
138 <link linkend="dec2bin">dec2bin</link>
144 <link linkend="dec2oct">dec2oct</link>
150 <link linkend="dec2hex">dec2hex</link>