mulaw1.m
来自「Speech Quantization_Compare SNRs of spee」· M 代码 · 共 21 行
M
21 行
function y = mulaw(x, mu)
%MULAW mu-law compression for signals with
%----- assumed maximum value of 1
%
% Usage: y = mulaw(x, mu);
%
% x : input signal, column vector with max value 1
% mu : compression parameter (mu=255 used for telephony)
%
% see also MULAWINV
%---------------------------------------------------------------
% copyright 1994, by C.S. Burrus, J.H. McClellan, A.V. Oppenheim,
% T.W. Parks, R.W. Schafer, & H.W. Schussler. For use with the book
% "Computer-Based Exercises for Signal Processing Using MATLAB"
% (Prentice-Hall, 1994).
%---------------------------------------------------------------
Xmax = 1;
y = (Xmax/log(1+mu))*log(1+mu*abs(x)/Xmax).*sign(x);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?