Scattered Interpolant in matlab

13 views (last 30 days)
SGK
SGK on 14 Feb 2024
Edited: Catalytic on 18 Feb 2024
I have matrices xs,ys,z. All the matrices are stored in a workspace and has size 41x50.
I would like to interpolate and store them in 2D lookup table. is it possible to use spline/cubic method in scatteredinterpolant command?
I used in the code but getting these errors.

Accepted Answer

Star Strider
Star Strider on 14 Feb 2024
The interpolation Method options are 'linear', 'nearest' and 'natural' (natural neighbor interpolation, giving no details that I can find, only an example).
The ExtrapolationMethod options are 'linear' 'nearest' or 'none'.
  3 Comments
SGK
SGK on 18 Feb 2024
Edited: SGK on 18 Feb 2024
out of these methods which can gives a good interpolation results?
I have seen that cubic and spline methods are very reliable since I cant able to use them in scatteredinterpolant what other methods can I use to interpolate these matrices?
Star Strider
Star Strider on 18 Feb 2024
I always experiment with all of them tto see which gives the best result, and again it depends on what I want to do (interpolate in a region, or draw a line on the surface, for example, because scatteredInterpolant computes lines well).
With respect to extrapolation, I again experiment, although in that instance, usually end up using 'nearest'.

Sign in to comment.

More Answers (2)

Catalytic
Catalytic on 18 Feb 2024
Edited: Catalytic on 18 Feb 2024
No. There is no such thing as spline interpolation or extrapolation when you are dealing with scattered data. It is inherently a gridded data thing.

the cyclist
the cyclist on 14 Feb 2024
Edited: the cyclist on 14 Feb 2024
No, according to the documentation for scatteredInterpolant, the available extrapolation methods are 'nearest', 'linear', or 'none'.

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!