Hello- I have a vector of values. for example purposes, we can say it's this:
x = [1 223 224 225 226 2 222 223 224 225 226 3 223 224 225 226]
For values 1 and 2, I need to identify the next instance of the the number 226. As you can see, using (n+4) won't work because the number 226 is in a different position each time. Is there a function that allows you to find the next instance of 226 in the array?
For value 3, I need to find a different number- let's say 225. I know I can solve this with conditionals, but just including that as a limitation for certain solutions (ie. I can't just write a function that identifies all single digit integers).