How to trim time series?
조회 수: 33 (최근 30일)
이전 댓글 표시
X = rand(1,128)-0.5;
fs = 1000;
Ts = 1/fs;
Y = lowpass(X,100,fs);
plot(Y);
Z = conv(X,Y);
THE length of Z is 255
I want to trim the ends off Z so that it has a length of 128.
What do I have to do?
댓글 수: 0
채택된 답변
Ravi Narasimhan
2021년 10월 2일
편집: Ravi Narasimhan
2021년 10월 2일
Are you trying to discard elements 129 through 255?
If so,
Z(129:end) = []; % Discard the unwanted elements
or
Z=Z(1:128); % Keep the desired elements
should do it.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sensors and Transducers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!