odeXX interpolation

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

odeXX interpolation

Carlo de Falco-2
Hi,

While looking at the functions being moved to core to support the
new ode integrators I noticed that in odekg there are re-implementations
of standard 1d interpolation functions.

For example it is obvious that "linear_interpolation" [0] is equivalent
to interp1 (... , "linear") and therefore it can be removed.

It seems to me that "hermite_cubic_interpolation" [1] is also equivalent
to interp1 (... , "pchip").

Can someone confirm the latter?
Are there other functions for higher order Hermite interpolation in Octave?

c.

[0] http://sourceforge.net/p/octave/odepkg/ci/default/tree/inst/dense_output/linear_interpolation.m
[1] http://sourceforge.net/p/octave/odepkg/ci/default/tree/inst/dense_output/hermite_cubic_interpolation.m
Reply | Threaded
Open this post in threaded view
|

Re: odeXX interpolation

Jacopo Corno


On 06/10/2015 18:35, Carlo De Falco wrote:

> Hi,
>
> While looking at the functions being moved to core to support the
> new ode integrators I noticed that in odekg there are re-implementations
> of standard 1d interpolation functions.
>
> For example it is obvious that "linear_interpolation" [0] is equivalent
> to interp1 (... , "linear") and therefore it can be removed.
>
> It seems to me that "hermite_cubic_interpolation" [1] is also equivalent
> to interp1 (... , "pchip").
>
> Can someone confirm the latter?
> Are there other functions for higher order Hermite interpolation in Octave?
Regarding hermite cubic interpolation, I did some tests with interp
(..., 'pchip') and the function pchip () itself and they do not allow
the interpolation with prescribed derivatives.

This seems to be compliant with Matlab. My suggestion would be to either
stay with the hermite_cubic_interpolation function as it is, or, if
there is interest to have such a function we could provide it. In File
Exchange there seems to exist such a function for Matlab [2].

Jacopo

[2]
http://www.mathworks.com/matlabcentral/fileexchange/28944-hermite-cubic-interpolating-polynomial-with-specified-derivatives

>
> c.
>
> [0] http://sourceforge.net/p/octave/odepkg/ci/default/tree/inst/dense_output/linear_interpolation.m
> [1] http://sourceforge.net/p/octave/odepkg/ci/default/tree/inst/dense_output/hermite_cubic_interpolation.m

--

Jacopo Corno M.Sc.
Technische Universität Darmstadt
Graduate School of Computational Engineering
Dolivostraße 15
64293 Darmstadt / Germany

Office: S4|10-232
Phone: +49 6151 16 - 76877
Email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: odeXX interpolation

Carlo de Falco-2

On 21 Oct 2015, at 13:27, Jacopo Corno <[hidden email]> wrote:

> In File Exchange there seems to exist such a function for Matlab [2].

Remember that the File Exchange website user agreement forbids to use code downloaded from there with Octave.

c.



Reply | Threaded
Open this post in threaded view
|

Re: odeXX interpolation

Jacopo Corno


On 21/10/2015 13:41, Carlo De Falco wrote:
> On 21 Oct 2015, at 13:27, Jacopo Corno <[hidden email]> wrote:
>
>> In File Exchange there seems to exist such a function for Matlab [2].
> Remember that the File Exchange website user agreement forbids to use code downloaded from there with Octave.
Yes, I was aware of that. I just wanted to say that there might be
interest in an implementation of the function

Jack
>
> c.
>
>

--

Jacopo Corno M.Sc.
Technische Universität Darmstadt
Graduate School of Computational Engineering
Dolivostraße 15
64293 Darmstadt / Germany

Office: S4|10-232
Phone: +49 6151 16 - 76877
Email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: odeXX interpolation

Richard Crozier
In reply to this post by Carlo de Falco-2


On 21/10/15 12:41, Carlo De Falco wrote:

>
> On 21 Oct 2015, at 13:27, Jacopo Corno <[hidden email]> wrote:
>
>> In File Exchange there seems to exist such a function for Matlab [2].
>
> Remember that the File Exchange website user agreement forbids to use code downloaded from there with Octave.
>
> c.
>
>
>
>

Interestingly though, you can now host code on Github, and have an entry
on the file exchange pointing to it. Presumably this means any code
hosted this way is not covered by this clause, and also not forced to
have a BSD licence.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.