I would suggest that you create your own 2-bit dec2bin:
function B = dec2bin_2bit(value)
bits = ['00'; '01'; '10'; '11'];
B = bits(value+1,:);
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!