I need to find the position of the first element of a list that is either greater than zero (or some other criterion) or a symbol.
Something like
lst={0,0,k,1,4}
and as result
position = 3
If there was no symbol the following command would do the job
First[Flatten[Position[lst, _?(Abs[#] > 0 &)]]]
If I add || MatchQ[_Symbol]
the answer will always be zero.
Many thanks
First[Flatten[Position[lst, _?(NumericQ[#] && Abs[#] > 0 &)]]]
? $\endgroup$