How to find the starting position of the array from where its value is strictly increasing?
Ältere Kommentare anzeigen
I have a huge temperature data with 2000 values.
It takes a couple of minutes for thermocouple to stabilize and then it increases steadily. I want to find out the position from which it is strictly increasing.
Thanks
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 16 Jul. 2012
pos = find( diff(YourData) <= 0, 1, 'last' ) + 1;
if isempty(pos); pos = 1; end
1 Kommentar
Walter Roberson
am 16 Jul. 2012
pos = find( [0 diff(YourData)] <= 0, 1, 'last'); %single line version
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!