[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing 'dsearch'

From: Stefan van der Walt
Subject: Re: Missing 'dsearch'
Date: Mon, 24 Oct 2005 20:09:16 +0200
User-agent: Mutt/1.5.9i

On Mon, Oct 24, 2005 at 10:36:07AM -0500, Maarten D. de Jong wrote:
> While researching some of the geometry functions in the SF-repositry, I 
> noticed that there is no 'dsearch'. Without it, no natural neighbours 
> interpolation is possible---and that is a nasty surprise, because I had 
> counted on using precisely that particular type of interpolation for my 
> work.

The function 'delaunay' is available, so implementing dsearch
shouldn't be too difficult.

In the meanwhile, a hack like this should work:

function i = dsearch(x,y,IGNORED,xi,yi)
  dx = x-xi;
  dy = y-yi;
  d = dx.^2 + dy.^2;
  i = find(d == min(d));


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]