필터 지우기
필터 지우기

check for decrease and increase

조회 수: 25 (최근 30일)
johnson saldanha
johnson saldanha 2018년 11월 5일
댓글: Image Analyst 2021년 11월 23일
i have a matrix and check for a column to see if the values are rapidly decreasing in steps of five. how to check for it? for example the matrix is x and the second column.

채택된 답변

KSSV
KSSV 2018년 11월 5일
Read about diff. This will get the difference of successive rows. If decreasing diff would be negative, if increasing diff will be positive.

추가 답변 (3개)

madhan ravi
madhan ravi 2018년 11월 5일
편집: madhan ravi 2018년 11월 5일
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5

Image Analyst
Image Analyst 2018년 11월 5일
편집: Image Analyst 2021년 11월 23일
Try the function findchangepts(), in versions of MATLAB r2016a and later.

Palnati saidatta
Palnati saidatta 2021년 11월 23일
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by