mu law compressor function

1 回表示 (過去 30 日間)
ahmad ramadan
ahmad ramadan 2018 年 10 月 22 日
編集済み: madhan ravi 2018 年 10 月 22 日
i have sawtooth function when i compress the function using this function
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);
  2 件のコメント
ahmad ramadan
ahmad ramadan 2018 年 10 月 22 日
u==255
madhan ravi
madhan ravi 2018 年 10 月 22 日
see the answer below

サインインしてコメントする。

採用された回答

madhan ravi
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)

その他の回答 (1 件)

ahmad ramadan
ahmad ramadan 2018 年 10 月 22 日
may explain what you did
thaanx lot
  1 件のコメント
madhan ravi
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 ExchangeDiscrete Fourier and Cosine Transforms についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by