Matlab coding for downsampli​ng........​......

조회 수: 38 (최근 30일)
Tinkul
Tinkul 2013년 2월 24일
How to downsample a sinusodial signal in matlab coding...............

채택된 답변

Wayne King
Wayne King 2013년 2월 24일
If you have the Signal Processing Toolbox, you can use downsample() to simply downsample without lowpass filtering. Or use decimate() or resample() to first lowpass filter and then downsample.
n = 0:159;
x = cos(pi/4*n);
% downsample by 2 starting with the first value
y = downsample(x,2,0);
% downsample by 2 starting with the second value
y1 = downsample(x,2,1);
You can of course do the above with simple MATLAB commands:
y = x(1:2:end);
y1 = x(2:2:end);
In general, do consider either decimate()or resample() as these afford anti-aliasing through filtering.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by