Code covered by the BSD License  

Highlights from
MATLAB for Digital Communication

image thumbnail

MATLAB for Digital Communication


Won Yang (view profile)


The MATLAB programs in "MATLAB/Simulink for Digital Communication" authored by Won Y. Yang et. al

function y=deci2bin1(x,l)
% Converts a given decimal number x into a binary number of l bits
if x==0, y=0;
 else y=[];
      while x>=1,  y=[rem(x,2) y]; x=floor(x/2);  end
if nargin>1, y=[zeros(size(x,1),l-size(y,2)) y]; end

Contact us