Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - Русский -
Scilabヘルプ >> Elementary Functions > Integer representation > bin2dec

bin2dec

2進表現を整数に変換

呼び出し手順

y=bin2dec(str)

引数

str

文字 '1' および '0'のみを含む文字列の行列

y

double行列,正の整数値

説明

2進文字列str を指定すると, この関数は, その2進表現がstrとなるような 10進数 y を返します. ( ystr の大きさは同じになります).

// 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)

参照

  • base2dec — bを基底とする表現から整数への変換
  • oct2dec — 8進数を10進数に変換
  • hex2dec — 16進数から10進数への変換
  • dec2bin — 10進数から2進数への変換
  • dec2oct — 10進数から8進数への変換
  • dec2hex — 10進数から16進数への変換
Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:35:23 CEST 2016