bin_state.m
资源名称:MIMO-OFDM.rar [点击查看]
上传用户:look542
上传日期:2009-06-04
资源大小:784k
文件大小:0k
源码类别:
传真(Fax)编程
开发平台:
Matlab
- function bin_state = bin_state( int_state, m )
- % Copyright Matt C. Valenti
- % MPRG lab, Virginia Tech
- % for academic use only
- % converts an vector of integer into a matrix; the i-th row is the binary form
- % of m bits for the i-th integer
- for j = 1:length( int_state )
- for i = m:-1:1
- state(j,m-i+1) = fix( int_state(j)/ (2^(i-1)) );
- int_state(j) = int_state(j) - state(j,m-i+1)*2^(i-1);
- end
- end
- bin_state = state;