?? bin_state.m
字號:
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 integerfor 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); endendbin_state = state;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -