Checking if an array element is larger than the following elements
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Valtteri Tikkanen
am 11 Mai 2017
Bearbeitet: Stephen23
am 11 Mai 2017
So if I have a large array of form A=[1,5,6,4,12...], is there a consistent way of checking if some element A(n), let's say A(3), is larger than the following ones? So in this case, I would like to find out that A(3)>A(4). Also, then I would like to change those elements in a way that any element A(n) is always equal or larger than any of the elements before it. So again, in this case I would like to change my array A from [1,5,6,4,12...] -> [1,4,4,4,12...] or [1, NaN, NaN,4,12,...].
Thank you.
3 Kommentare
Valtteri Tikkanen
am 11 Mai 2017
Bearbeitet: Valtteri Tikkanen
am 11 Mai 2017
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!