Thanks very much Patrick, Henry and Raul for your suggestions.

I did not read far enough down in the dictionary to see I. when looking
to solve this problem. I've learned a lot from this simple problem.  On
my machine:

  ts 'YISO =: XI interp3 X;Y'
0.360464 1.37946e6
  ts 'YIJPH =: (X;Y) lintrp XI'
0.007234 887680
  ts 'YIHR =: XI resamp X,:Y'
0.017489 1.54445e6

There is a very small difference (of the order 1e_8, increasing with
index and evenly distributed about zero) between Patrick's very fast and
memory-efficient version's YI values and those of the other three
routines for my example problem.  It may be a rounding error, but I have
not investigated the reason for the discrepancy yet.  plot XI;YISO-YIJPH
shows the difference.

Sean

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to