How to use find function to find consistent value in column?

조회 수: 1 (최근 30일)
Franchesca
Franchesca 2014년 5월 15일
답변: Sean de Wolski 2014년 5월 15일
How do I find when a value in a matrix is the same (+ or - 5%) for say 20 rows?
I have this code so far:
%% Find start of jump
st = find(mydata(:,5),
but I don't know how to finish the find function of to find when the value of the rows is constant (+ or - 5%) for 20 rows for example.

채택된 답변

Sean de Wolski
Sean de Wolski 2014년 5월 15일
Look at diff() This will tell you the difference between rows.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by