Dynamic-Calibration/utils/YALMIP-master/extras/dec2decbin.m

6 lines
196 B
Matlab
Executable File

function s=dec2decbin(d,n)
%DEC2BIN Internal function generate binary matrices
[f,e]=log2(max(d)); % How many digits do we need to represent the numbers?
s=rem(floor(d(:)*pow2(1-max(n,e):0)),2);