No BSD License  

Highlights from
Digital Signal Processing Using MATLAB

Digital Signal Processing Using MATLAB

by

 

21 Aug 2002 (Updated )

Companion Software

mulaw_c(s,mu)
function [y] = mulaw_c(s,mu)

% mu-law compressor

% -----------------

% [y] = mulaw_c(s,mu)

%  y = compressed output signal

%  s = zero-mean nomalized signal between -1 and 1

% mu = parameter mu

%

if mu == 0 

   y = s;

else

   y = (log(1+mu*abs(s))/(log(1+mu))).*sign(s);

end

Contact us