eight2bin.m
上传用户:m_sun_001
上传日期:2014-07-30
资源大小:1115k
文件大小:0k
- function y = eight2bin(x)
- % eight2bin
- %
- % Converts eight bit data (0-255 decimal) to a binary form for processing.
- y = zeros(1,8);
- k = 0;
- while x > 0
- y(8-k) = rem(x,2);
- k = k+1;
- x = floor(x/2);
- end