Fri 15 Apr 2011 09:27:24 AM UTC, comment #8:
Hello,
I have finally pushed this changeset. Since it changes the interpolations functions as well, there is a risk that something does not work as expected. I have applied it to the default branch only.
Kai
|
Wed 16 Mar 2011 11:37:18 PM UTC, comment #7:
I tried the tests and demos for interp1, mkpp, pchip, ppval, and spline.
Everything work as expected.
|
Wed 16 Mar 2011 09:09:51 PM UTC, comment #6:
Hello,
this took longer than expected. I have a working changeset, which fixes the incompatibilities with matlab, like the structure filed names and the handling of ND arguments. So, please give it a try and report any problems you observe. Since I have touched interp1 as well, there is a risk that I have broken code that depends on interpolation. I have run a lot of tests, but there might me some hidden issues.
The script of JuanPi works if ppder is called instead of fnder.
Kai
(file #22940)
|
Wed 09 Feb 2011 07:59:37 PM UTC, comment #5:
Just an intermediate comment. I have decided to change the pp structures to be compatible with matlab. Until now we were incompatible to large degree with the current matlab versions with respect to the shape of the coefs matrix and other things.
The good news is that I have now compatible mkpp, unmkpp, ppval functions. Currently I am working on spline, pchip, and interp1 to make them also compatible.
After that I have to work on the demos and tests. So this might take some more time.
Kai
|
Thu 06 Jan 2011 01:45:22 PM UTC, comment #4:
I don't have answers to the questions raised, but I will have a look at the problem described by Juan.
Kai
|
Thu 06 Jan 2011 12:45:54 PM UTC, comment #3:
I noticed the difference in fields as well. Perhaps ...
- Change the structures to that used by ML.
- Write a simple function do convert between the current structure and the ML one, and call it when needed.
Regarding the size change, I'me not certain, but I suspect it is/was intended to allow more than one piecewise polynomial (see "demo mkpp").
My spare time for Octave is directed to fixing printing on WIndows (MinGW). Once that is done, I can take a look at this. However, it would better if someone more familiar with how this work and where it is used took a look.
|
Thu 06 Jan 2011 07:26:15 AM UTC, comment #2:
It appears the Matlab spline and fnder functions create structures with the fields 'form', 'breaks', 'coefs', 'pieces', 'order', and 'dim', but Octave produces structures with the fields 'x', 'd', 'P', and 'orient' (for both) and also 'k' for fnder. What's the reason for the difference? Is this something that we should try to fix before the release? I imagine someone somewhere depending on these fieldnames, so they might as well be the same...
Also, it seems the orientation of the P field has changed. For the example below, pp.P is 1x9x4 now, but in 3.2.4 it is 9x4. Why has this changed? In Matlab, it is apparently 9x4 (and called coefs instead of P).
|
Tue 04 Jan 2011 02:50:55 PM UTC, comment #1:
I noticed the demo for mkpp no longer runs. Perhaps the changeset which improved the compatibility with ML has resulted in breaking some older code. The changeset is linked to below.
http://hg.savannah.gnu.org/hgweb/octave/rev/31900e17b5f5
However, it doesn't look to me like the problem is with mkpp, but with fnder. Looking at ppd, there are 9 different regions for which polynomials must be specified. However, ppd.P only includes coefficients for 8 regions. Thus when the evaluating within the last region an error occurs.
I've cc'd Kai Habel.
|
Mon 03 Jan 2011 07:05:35 PM UTC, original submission:
The following lines where giving no errors in Octave 3.2.4 (Ubuntu 10.10)
In 3.3.54 and the repository version the last line gives the following error
If I change xi for
then
works fine
output of
Checked in the dev compiled for Ubuntu 10.10
|