%BIN2DEC Convert text representation of binary number to double value
%   D = BIN2DEC(BINSTR) converts the integer represented by BINSTR to the
%   equivalent decimal number and returns D as a double-precision value.
%
%   If BINSTR represents an integer greater than or equal to FLINTMAX,
%   then BIN2DEC might not represent it exactly as a double-precision
%   floating-point value.
%  
%   BINSTR can be a character array, a cell array of character vectors, or
%   a string array. If BINSTR is a character array, then each row is
%   treated as a binary value.  If BINSTR is a cell array of character
%   vectors then D is column vector, regardless of input shape. If BINSTR
%   is a string array then D is the same shape as the input shape.
%
%   Embedded, significant spaces are removed. Leading spaces are converted
%   to zeros.
%
%   BINSTR can be binary text syntax with prefix and optional suffix.
%
%   Example
%       bin2dec('010111') returns 23
%       bin2dec('010 111') also returns 23
%       bin2dec(' 010111') also returns 23
%
%       bin2dec('0b11111111s8') returns -1
%
%   See also DEC2BIN, HEX2DEC, BASE2DEC, FLINTMAX, INTMAX.

%   Copyright 1984-2020 The MathWorks, Inc.
