bugGNU Octave - Bugs: bug #35821, 'TriScatteredInterp' and...

 
 

bug #35821: 'TriScatteredInterp' and scatteredInterpolant are not yet implemented.

Submitter:  None
Submitted:  Mon 12 Mar 2012 10:14:32 PM UTC
   
 
Category:  Libraries Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  In Progress Assigned to:  nrjank
Originator Name:  Christian Remmersmann Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 18 Apr 2023 04:32:17 PM UTC, comment #11: 

no update on code but some thoughts:

there is also a griddedInterpolant function. it is very similar to scatteredInterpolant. I suspect there is a non-user accessible Interpolant class that they both inherit from and it would probably make sense to do something with these rather than implement them independently. maybe a to-do after finishing scatteredInterpolant.  TriScatteredInterpolant could probably also be written as a subclass that inherits a limited set of scatteredInterpolant features, which would then make it look more compatible.  (actually this could probably be done now rather than just an m-code function wrapper.)

this implementation has a compatibility warning regarding triangulation difficulties. certain simple test points result in interpolants that indicate matlab's scatteredInterpolant uses the delaunayTriangulation class rather than delaunayn, which this version uses.  delaunayTriangulation is stated to be a subclass of their triangulation class, neither of which is implemented yet in Octave.  Full compatibility on the interpolation functions will likely require these triangulation classes be implemented as well.

a bit late for 2023, but might make a good future year GSOC project.

Nicholas Jankowski <nrjank>
Group Member
Wed 15 Mar 2023 03:00:18 PM UTC, comment #10: 

realized I let this sit for quite some item. attaching a partial (quite obviously a work in progress) implementation.  The TriScatteredInterp wrapper to scatteredInterpolant is complete.  As mentioned below, the scatteredInterpolant class is only partially done.  What's incomplete are the natural method interpolation, and linear and natural method extrapolation. If you limit yourself to nearest and linear for interp, and nearest for extrap, it should produce correct outputs.

also retitling to capture the fact that scatteredInterpolant is part of this report.

(file #54485, file #54486)

Nicholas Jankowski <nrjank>
Group Member
Tue 16 Nov 2021 09:54:11 PM UTC, comment #9: 

i've begun working up a compatible classdef version of TriScatteredInterp and scatteredInterpolant.  TriScatteredInterp is just a wrapper to scatteredInterpolant, but unlike the comment #5 version as a wrapper to griddata, this version is intended to be fully compatible.

Once i sort through natural interpolation and their least squares linear extrapolation, it should be largely complete. Plan to do the latter then the former, as I could put forward a version minus natural interpolation and it would still be useful.

Nicholas Jankowski <nrjank>
Group Member
Sun 06 Oct 2019 01:52:28 AM UTC, comment #8: 

both functions are still missing in octave 5.1.0

Nicholas Jankowski <nrjank>
Group Member
Sat 19 Nov 2016 08:30:26 PM UTC, comment #7: 

The Matlab functions "scatteredInterpolant" (and the now obsolete "TriScatteredInterp") are still missing in Octave 4.2.0.

Those new functions are provided as files in comment #5.

Hartmut <hardy>
Fri 25 Sep 2015 06:43:41 PM UTC, comment #6: 

I'd like to test this change. How can I apply the change to my Octave installation to test this out?

Ben Cipollini <bcipolli>
Mon 16 Dec 2013 08:50:40 AM UTC, comment #5: 

Hacked together a quick wrapper for this today.  I actually implemented it under the class name scatteredInterpolant (which is what the mathworks seems to want to call it these days), but the important parts of the interface are essentially identical for TriScatteredInterp, so I threw in a wrapper for that that just creates a scatteredInterpolant object.

FTR, I used the old class mechanism, because the new classdef setup doesn't allow me to override the subsref method (yet?), which is required to replicate the functionality.  It doesn't really matter though, since scatteredInterpolant in matlab implements 'value' copy semantics.

Also, whoever takes care of this may want to clean up my patch since I'm still getting used to the octave coding style.

(file #29932)

Ben Kurtz <bkurtz>
Tue 13 Mar 2012 09:57:42 PM UTC, comment #4: 

Jordi,

I don't think this requires classdef,
it should be possible to do it with the
"old style" classes whiche are currently in Octave ...
Is there any reason why you think this is not possible?

Cristian,
I should have a slightly modified version of griddata
that does something very similar to what you want, i.e.:

[z_1, Interpolationobject] ...
   = griddata(x_old, y_old, z_old, x_1, y_1);

z_2 ...
   = griddata(x_old, y_old, z_old, x_2, y_2, ...
              Interpolationobject);

If you're interested I can look it up and post it somewhere,
e.g. on Agora.

c.

Carlo de Falco <cdf>
Group Member
Tue 13 Mar 2012 09:25:58 PM UTC, comment #3: 

This first requires implementing classdef classes in Octave. That's a huge thing in itself. Let's postpone this.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Tue 13 Mar 2012 09:21:26 PM UTC, comment #2: 

You are right, Carlo,
'griddata' provides the functionallity of 'TriScatteredInterp'.
But as far as I can see, a simple wrapper is not enough to assure compatibility to MATLAB.
That is because of the different usage of the commands:

Using Octave one would write:

z_new=griddata(x_old,y_old,z_old,x_new,y_new);

In MATLAB it is:

Interpolationobject=TriScatteredInterp(x_old,y_old,z_old);
z_new=Interpolationobject(x_new,y_new);

Thus, I think it is necessary, to split up the functionality of griddata. Currently, I don't have the time to do this myself, sorry.

Anonymous
Tue 13 Mar 2012 08:20:38 PM UTC, comment #1: 

you can perform the same tasks using "griddata"
actually it would be quite easy to implement
TriScatteredInterp as a wrapper around griddata,
would you like to submit a changeset?

Carlo de Falco <cdf>
Group Member
Mon 12 Mar 2012 10:14:32 PM UTC, original submission:  

The MATLAB-command 'TriScatteredInterp as described  here:
http://www.mathworks.de/help/techdoc/ref/triscatteredinterp.html
is apparently not yet available.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54485:  scatteredInterpolant.m added by nrjank (56KiB - text/plain - partial implementation)
file #54486:  TriScatteredInterp.m added by nrjank (4KiB - text/plain - partial implementation)
file #29932:  scatteredInterp.patch added by bkurtz (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by bcipolli (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by bkurtz (Updated the item)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-03-15 nrjank Attached File- Added scatteredInterpolant.m, #54485
        Attached File- Added TriScatteredInterp.m, #54486
        SummaryMATLAB-Function 'TriScatteredInterp' is not yet implemented. 'TriScatteredInterp' and scatteredInterpolant are not yet implemented.
    2021-11-16 nrjank StatusPostponed In Progress
        Assigned toNone nrjank
    2015-06-04 mtmiller Severity3 - Normal 1 - Wish
        Release3.6.1 dev
        Operating SystemMicrosoft Windows Any
    2013-12-16 bkurtz Attached File- Added scatteredInterp.patch, #29932
    2012-03-13 jordigh Priority5 - Normal 1 - Later
        StatusNone Postponed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code