Missing 'dsearch'

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing 'dsearch'

Maarten D. de Jong
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.

Unfortunately, the MATLAB equivalent is (from what I can make out) labelled
'private' and therefore not available as a straighforward .m-file, but only
as a .dll. In other words, not in human-readable and thus portable,
.oct-able format. Does anyone have a suggestion how to get dsearch to
function on Octave?


Kind regards,
Maarten



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

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Missing 'dsearch'

John W. Eaton-6
On 24-Oct-2005, Maarten D. de Jong wrote:

| Unfortunately, the MATLAB equivalent is (from what I can make out) labelled
| 'private' and therefore not available as a straighforward .m-file, but only
| as a .dll. In other words, not in human-readable and thus portable,
| .oct-able format. Does anyone have a suggestion how to get dsearch to
| function on Octave?

If you mean you were planning to take code from Matlab and translate
for use with Octave, then that would not be a good solution anyway,
because the code in Matlab is not freely available.  You also might
want to check your Matlab license agreement to see whether it is
allowed, even for personal use.

It would be good to have the additional functionality for Octave, but
if it is to be useful for everyone who uses Octave and not just you,
then it can't be in derived from something that is non-free.

jwe



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

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Missing 'dsearch'

Stéfan van der Walt
In reply to this post by Maarten D. de Jong
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));
endfunction

Regards
Stéfan



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

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------