From: Mathew Y. <my...@jp...> - 2006-07-11 20:49:29
|
I can handle the following problem by iterating through some indices but I'm looking for a more elegant solution. If I have a 1d array, I want to find a contiguous nonzero region about a given index. For example, if a=[1,2,3,0,40,50,60,0,7,8,9] and we start with the index of 5, then I want the indices 4,5,6 Any gurus out there? Mathew |