Edge distortion when resampling a signal

14 ビュー (過去 30 日間)
Romio
Romio 2020 年 1 月 18 日
コメント済み: Star Strider 2020 年 1 月 19 日
I have the follwing cosine signal that is sampled at rate fs = 32 Hz.
f = 30;
fs = 32;
dt = 1/fs;
t = -0.5:dt:0.5;
c = cos(2.*pi.*f.*t);
figure
plot (t,c)
I want to upsample it as follows:
figure
ty = linspace(-0.5,0.5,270)
y = resample(c,1003,123);
plot(ty,y)
But as you can see there is distrotion at the edge. Is there any way to avoid that?

採用された回答

Star Strider
Star Strider 2020 年 1 月 18 日
From the documentation:
When filtering, resample assumes that the input sequence, x, is zero before and after the samples it is given. Large deviations from zero at the endpoints of x can result in unexpected values for y.’ (In: Resample Linear Sequence)
Minimize it by increasing the filter order and using a Kaiser window.
For example:
y = resample(c,1003,123, 16, 192);
Experiment with these and other additional arguments to see the result.
  4 件のコメント
Romio
Romio 2020 年 1 月 19 日
Thank you!
Star Strider
Star Strider 2020 年 1 月 19 日
My pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by