f =: 1 : (':'; 'u >: | x-y') list =: 133 139 153 159 165 tolerance =: 7 center =: 153 list tolerance f center 0 0 1 1 0
list tolerance(<:&)@|@-center 0 0 1 1 0 <reference> Date: Sun, 26 Dec 2010 21:32:07 -0600 From: "PackRat" <pack...@anet.com> Subject: Re: [Jprogramming] Matches within a range To: Programming forum <programming@jsoftware.com> Message-ID: <4d1808b7.1875.3d0de...@packrat.anet.com> Content-Type: text/plain; charset=US-ASCII > if the array contains: ... 133 139 153 159 165 ... > then the returned list contains: ... 0 0 1 1 0 ... > for use with the "copy" (#) command > OR > the returned array might contain only the matching positions (13 > 14, > for example). > > Does does this clarify what I'd like to be able to do? Thanks! > > Harvey ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm