MATLAB Answers

0

scatteredInterpolant giving unexpected plateaus

Asked by Alan Sper on 26 Sep 2019
Latest activity Answered by Bjorn Gustavsson on 26 Sep 2019
Hello,
I am having issues with scatteredInterpolant.
I have digitised a graph (called a Balje Diagram) using a web-based software. This graph contains multiple curves corresponding to iso-efficiencies. I want to be able to find the coordinates for an efficiency in between the source data, as only 0.1 intervals have been provided. When I use the function and plot the results, I get unexpected plateaus/noise in the 'corner' regions (or spurs of the contour) of the interpolation. As a result, I will get jumps if I were to plot one of the axes with respect to efficiency.
I have tried using more and less data points from the plot digitisation, including adding more points at these 'corners'. I have also included an arbitrary point corresponding to 1, as this would be the maximum possible. Unfortunately, these plateaus still occur. This phenomenon occurs for both linear and natural interpolation methods.
Does anyone know how I could prevent this from happening?
Unfortunately, I cannot attach a .fig as there is too much data. I have included a .png and the relevant code. Please note that the .png image does not contain an arbitrary '1' efficiency.
Kind regards,
Alan

  0 Comments

Sign in to comment.

1 Answer

Answer by Bjorn Gustavsson on 26 Sep 2019

When I tried to download the mat-file I get nothing when I try to load it, it seems empty, could you check that the one you actually upload contains something?
Ig I understood you right you have your input-data at the 0.4, 0.5, 0.6, 0.7, 0.8 levels in contour-format. Then I guess you can think of the reason for these plateaus starting from a triangulation of the suface, then in the plateau-region you would have a triangulation between the points along the "lower" contour and one point at the upper level:
Metric_Balje_Diagram_closed_curves.png
All points except the leftmost in my sketching would be at the same level -therefore giving you a flat interpolation. And I think you'd get triangulations like that regardless of how many points along the contours you have, details might vary but
the overall structure would be this.
Them's the breaks - that is the data you have that is what the "most sensible" interpolation gives you, with some meaning of "most sensible". It does indeed look very peculiar. The question is not if you can be clever but whether you should be clever - the first idea that springs to mind is to interpolate along lines perpendicular to the contours (that should be parallel to the local gradient at the contour). In this case it might work Ok if you start from the higher levels and calculate the interpolation-line from that level to the next lower level and interpolate inbetween. A slightly simpler "clever" thing to do would be to "interpolate along the ridges" and add points inbetween the contours. Both of these idead might be justifiable in this case, but adding points like this is, in my opinion, questionable.
Another idea is to try gridfit - that is a scattered-data suface-fitting function that might have the right properties for doing your interpolation in a better way. Gridfit is, as I've understood it something akin to a spline-like surface fitting function.
HTH

  0 Comments

Sign in to comment.