mu law compressor function
1 次查看(过去 30 天)
显示 更早的评论
i have sawtooth function when i compress the function using this function
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192257/image.png)
the matlab give me error
my code T = 10*(1/50); Fs = 10000; dt = 1/Fs; t = 0:dt:T-dt; x4 = sawtooth(2*pi*50*t);
Xc = (log(1 + 255*abs(x4)) / log(1+u)) * sign(x4);
采纳的回答
madhan ravi
2018-10-22
编辑:madhan ravi
2018-10-22
T = 10*(1/50);
Fs = 10000;
dt = 1/Fs;
t = 0:dt:T-dt;
x4 = sawtooth(2*pi*50*t);
u=255
Xc = (log(1 + 255.*abs(x4)) ./ log(1+u)) .* sign(x4)
0 个评论
更多回答(1 个)
ahmad ramadan
2018-10-22
1 个评论
madhan ravi
2018-10-22
编辑:madhan ravi
2018-10-22
Anytime ;) I used dot in front of multiplication and division that's it which is know as element wise operation
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Low-Level File I/O 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!