---David Vincent-Jones wrote:
> Yes ... I want to sample every 10th. pixel, not a full
> resolution sample
> block.
>
> On Wed, 2008-09-10 at 22:19 +1200, Sherlock, Ric wrote:
> > Can you confirm that you want to sample every 10th pixel
> rather than take a 500 by 400 pixel region from the original?
> >
> > If so then this might work?
> >
> > subset=: 3 : 0
> > 10 subset y
> > :
> > idx=. x&[EMAIL PROTECTED] x %~ 2{.$y
> > (<idx,<a:){y
> > )
A simpler tacit version of subset:
subset=: ] {~ <@:([ *&.> [: i.&.> [ %~ 2 {. [EMAIL PROTECTED])
10 subset tst
0 1 2
30 31 32
60 61 62
90 91 92
1200 1201 1202
1230 1231 1232
1260 1261 1262
1290 1291 1292
2400 2401 2402
2430 2431 2432
2460 2461 2462
2490 2491 2492
3600 3601 3602
3630 3631 3632
3660 3661 3662
3690 3691 3692
4800 4801 4802
4830 4831 4832
4860 4861 4862
4890 4891 4892
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm