How to cut the signal for a particular time period
조회 수: 5 (최근 30일)
이전 댓글 표시
I had a data with x samples in which i only need the samples during the time period y.How can I get those specific samples?
댓글 수: 0
답변 (2개)
KSSV
2018년 5월 21일
편집: KSSV
2018년 5월 21일
Read about inerp1. Do the interpolation and get what you want.
Let t,x be your signal, and you want signal value at time ti.
xi = interp1(t,x,ti) ;
댓글 수: 2
KSSV
2018년 5월 21일
If you want to know where 1 comes...let x be your signal.
tol = 10^-3 ;
idx = x(abs(x-1)<=tol) ;
iwant = t(idx)
Ameer Hamza
2018년 5월 21일
편집: Ameer Hamza
2018년 5월 21일
y = x(1:seqperiod(x));
For example
x = [1 2 3 1 2 3 1 2 3 1]
y = x(1:seqperiod(x))
y =
1 2 3
Note: This function require Signal Processing Toolbox
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!