help-octave
[Top][All Lists]
Advanced

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

Re: Interp2 cubic. Diff between Matlab and Octave


From: Jaroslav Hajek
Subject: Re: Interp2 cubic. Diff between Matlab and Octave
Date: Mon, 11 May 2009 08:18:05 +0200

On Sun, May 10, 2009 at 11:55 PM, Andres Sepulveda
<address@hidden> wrote:
> Hi,
>
>  We want to port a Matlab code to Octave but where it uses the interp2
> function with the 'cubic'  flag we get the following diference. Any
> idea why this happens?
>
>  Andres Sepulveda
> University of Concepcion, CHILE
>

In general you can't expect Octave to use identical algorithms to
Matlab, so results may differ. The Matlab docs don't seem to connect
"cubic" to any particular well-known method. If you can work with the
development sources, you can try the "pchip" method of interp2, which
I contributed recently. This should be more conservative than cubic or
spline, and should not amplify local extrema but preserve them. Since
your data seem to be very peaky, it might be of interest.

regards

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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