Binary to Decimal coversion

버전 1.0.0.0 (1.6 KB) 작성자: Raviteja
Convert Binary to Decimal Equivalent. It also convert fractional binary values.
다운로드 수: 307
업데이트 날짜: 2011/10/5

라이선스 보기

% BIN2DECIMAL Function convert binary string to decimal equivalent.
% This program also works for fractional binary numbers.
% Input: Binary string
% Output: Decimal equivalent of input Binary string
%
% NOTE: keep format as long for high floating point precision
% >>format long
%
% A white space is assumed to be . (point)
% >>bin2decimal('10101') returns 21
% >>bin2decimal('10.101') returns 2.625000000000000
% >>bin2decimal('10 101') returns 2.625000000000000
% >>bin2decimal('.10101') returns 0.656250000000000
% >>bin2decimal(' 10101') returns 0.656250000000000

인용 양식

Raviteja (2026). Binary to Decimal coversion (https://kr.mathworks.com/matlabcentral/fileexchange/33139-binary-to-decimal-coversion), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2011a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Characters and Strings에 대해 자세히 알아보기
버전 게시됨 릴리스 정보
1.0.0.0