In Matlab R2010a:
I am familiar with finding values based on criteria as well as finding the first value in a vector that satisfies criteria. However, how does one find X
's and not Y
's in the following example? In this case, X
's are the first values of a group of values that are findable given my criteria, and there are multiple groups like this amidst thousands of junk values.
I have an vector with 10,000 or more values. Let J
be junk values, while X
and Y
are both values my find criteria will pick up. X
's are interesting to me because they are the 'first' values of a series of values that satisfy my criteria before becoming J's. Assume that there are hundreds or thousands more J
's in between the X
's and Y
's, but here is a small example
[J,J,J,J,J,J,J,J,J,J,J,X,Y,Y,Y,Y,J,J,J,J,J,J,J,J,J,X,Y,Y,Y,Y,J];