help-octave
[Top][All Lists]
Advanced

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

Re: FIXED: INTERP2 problem


From: Paul Kienzle
Subject: Re: FIXED: INTERP2 problem
Date: Fri, 25 Nov 2005 22:49:06 -0500

Thanks for your efforts.  As this is a community project it only
improves when people write code to fix things and bother to tell
others about it.

I'm not going to post your new version to the repository
because the for loops will kill performance on a large mesh.
I don't see anything that would prohibit replacing them with
the usual vectorization techniques, but I didn't look very closely.

- Paul

On Nov 24, 2005, at 4:58 PM, Pierre Baldensperger wrote:

Hello again,

Just in case anybody runs into the same INTERP2 problem as mine (see previous posts): the "interp2.m" routine (from octave-forge-2005-06-13) assumes that interpolating points XI and YI are in "meshgrid" format (and if they are vectors, the "meshgridding" is forced at the beginning of the routine). This
behaviour is _not_consistent_ with INTERP2's help message, nor with the
behaviour of its namesake routine in Matlab.

To solve my problem, I finally modified the routine myself to make its
behaviour more consistent with what it should (IMO) be. I modified both the "linear" and "nearest" methods. You will find a copy of the modified routine attached to this post. I don't know how to submit it to the maintainer and don't want to bother with that. So hopefully, if this fix is useful, somebody will find it here, adapt it and transfer it to the main octave repository.

Please be advised that this is a quick & dirty fix and probably not very smart programming: use at your own risks, but at least it works for me. In case you want to try it, remember that the behaviour of this routine wrt XI and YI has
changed: you may need to modify code that assumes the former behaviour.

Regards,
-Pierre.



-------------------------------------------------------------
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 via email to

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