In article <8c3834d3-30ca-49a8-9d0e-6bf9d97c0c9f@l23g2000pro.googlegroups.com>,
"Dr G." <gjhay@ucalgary.ca> wrote:
> Hi Folks,
>
> Q: Can the IDL geometry geniuses out there think of a fast way to
> create a 2D mask that automatically half�s an irregularly shaped 2D
> array along its x axis (i.e., from top to bottom) Eg:
>
> [0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0]
> [0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0]
> [0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0]
> [0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0]
> [0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0]
> [0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0]
> [0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0]
> [0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0]
> [0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0]
> [0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0]
> [0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0]
> [0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0]
>
> Merci.
>
> Gf
What is it that you want? The index of the middle 1 in each row?
Ken
|