create new matrix with another matrix (downsampling)

조회 수: 1 (최근 30일)
Kamyar Mazarei
Kamyar Mazarei 2021년 4월 9일
댓글: Dyuman Joshi 2021년 4월 11일
hi
i have a 1xm matrix 'A' and want to make a new matrix that is 1xn 'B'
matrix B has values from matrix A IF the change in values are greater than 5 each time (if A(1,m)-A(1,m+1)>5)
(B is kinda down sample of A with a thereshold in pairs)
  댓글 수: 1
Dyuman Joshi
Dyuman Joshi 2021년 4월 11일
B=A(diff(A)>5)
note that diff(A) is A(i+1) - A(i) and not A(i) - A(i+1) as you mentioned.

댓글을 달려면 로그인하십시오.

답변 (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