I have a little bit of a tricky problem that I am trying to solve. I am still rather new to Matlab, so I am a little bit stuck on how to approach this problem. I will try to explain with a simple example. I have a matrix and I am trying to find the maximums of the 2nd and 3rd columns between every two values of the last column. Here is an example:
Matrix=[1 2;2 2;1 2;3 3;2 3;2 3;2 4;3 4;4 4]
I then want to find the maximums for column 1 for every i and i+1, based off the last column. So the first maximum would be found for 2:3 of the last column, which would be the first 6 rows. The first maximum would then be 3.
The next maximum would then be between 3:4 based off the values in the last column. The maximum would then be 4. I would also like to find the indices of these maximums that way I can pull the location of the maximum values.
I hope this makes sense, it's rather hard to explain.