Hello, I have a vector suppose a function f(x), such that
f(x)= …0,0,0,0,0,0,0,0,5,6,7,4,3,5,6,7,8,0,0,0,0,0,0,0… and
x = 1,2,3,4,5,….
I don't know which command can I use to find those values of x for which the values of f(x) are 5 and 8 (i.e the first and last non-zero values)?
Best Answer