Hello Mark44,
Thanks for your reply. I appreciate your effort.
Actually, I probably confused readers by mentioning "non-negative indices". Ideally, I want to find the SPAN of indices that correspond to the "positive elements" in an array. Note that, it is not equal to the number of "positive...
Hello,
I have an array of length M. Some of the indices are non-negative. I need to derive a function/analytic expression (preferably linear or convex) that finds the span of indices for which the indices are non-negative.
Example: Let p denote the desired vector.
Let, p = [0 0 0.3 2.6...