Trying to compress a signal.
16 次查看(过去 30 天)
显示 更早的评论
Hi guys im trying to compress a signal
n is the time vector given by : n=[0 1 2 3 4 5 6 ] and xn is the vector with the values of the discrete sequence and is: xn=[0 1 2 3 4 1 0]
signal compression is "x(2*n)", x2n= [0 2 2 0 0 0 0] .
Is there any way to calculate these new points in matlab?
Thanks!
0 个评论
采纳的回答
Walter Roberson
2021-9-27
compressed_x = x(1:2:end);
4 个评论
Walter Roberson
2021-9-27
n=[0 1 2 3 2 1 0]
x = [0 1 2 3 4 1 0]
n2idx = @(n) n+1;
xn = @(n) x(n2idx(n))
x2n = @(n) x(n2idx(2*n));
xn(n)
x2n(n)
更多回答(1 个)
Sulaymon Eshkabilov
2021-9-26
Have you read this help DOC: https://www.mathworks.com/help/signal/ug/dct-for-speech-signal-compression.html
that explains all steps of signal compression in a logical order.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Signal Generation and Preprocessing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!