Skip to main content

conditional - Find Array Elements That Meet a Condition


I have an array of 5 numbers (say m). I want the following operation


m=[-1,-3,-2,-5,-4] For (j=1,j==5,j++) if m(j)-m(j+1)>0


Display the index and array element value of array m and exit the loop.




Comments