bin2eight.m
上传用户:m_sun_001
上传日期:2014-07-30
资源大小:1115k
文件大小:0k
- function y = bin2eight(x)
- % bin2eight
- %
- % Converts binary data to an eight bit form
- % Accepts 1x8 array and returns the corresponding decimal
- y = 0;
- k = 0;
- for i = 1:8
- y = y + x(8-k)*2^k;
- k = k+1;
- end