Say I have a vector:
A = [1.444, 1.425, 1.435, 1.438, 1.438, 1.436, 1.436, 1.436, 1.436, 1.436];
As can be seen, this vector A
stabilises or converges at 1.436
. How can I find the index of this value for example 1.436
in MATLAB?
Edit:
More Examples:
B = [1 2 1 4 2 5 6 2 5 5 5 5 5 5 5 5 5 5]
C = [224.424 224.455 224.454 224.456 224.456 224.452 224.451 224.456 . 224.454 224.454 224.454 224.454 224.454 224.454]
So the output I want is the index for when the elements in the vectors doesn't change anymore. Say for example that the values in the vectors are taken at a time t
. So for the first vector that index would be at index 9
, when the elements stay constant at 5
.
Same thing with vector C
. The wanted output here is index 9
, when the elements are constant at 224.454
.