I was wondering if there is a way to do bicubic interpolation on a scattered data set (2d)? I did some online searches and figured out that bicubic patches (not sure what these are) need to be fitted on scattered data. Not sure how to proceed from here. Any help will be appreciated!
Note: I understand that Matlab recommends TriScatteredInterp
and griddata
to interpolate on scattered points. However, TriScatteredInterp
is a triangulation interpolation and does not uses splines to interpolate the data.
The data which I have looks something like this (x, y, val):
x = [0 0 0 0 0.28 0.28 0.28 0.28 -0.28 0.28 -0.28 -0.28 -0.988 -0.988 -0.988 -0.988 -0.708 -0.708 -0.708 -0.708 -1.268 -1.268 -1.268 -1.268 0.988 0.988 0.988 0.988 1.268 1.268 1.268 1.268 0.708 0.708 0.708 0.708]
y = [0.9993 0.8113 0.6233 0.4353 0.9373 0.7493 0.5613 0.3733 0.8733 0.6853 0.4973 0.3093 0.9993 0.8113 0.6233 0.4353 0.9373 0.7493 0.5613 0.3733 0.8733 0.6853 0.4973 0.3093 0.9993 0.8113 0.6233 0.4353 0.9373 0.7493 0.5613 0.3733 0.8733 0.6853 0.4973 0.3093]
val = [0.25 0.35 0.19 0.14 0.19 -0.45 -0.96 0.61 0.19 0.20 0.22 0.38 0.15 0.51 0.53 0.68 0.36 0.21 0.52 0.70 0.14 0.34 0.45 0.63 0.25 0.40 0.76 0.65 0.82 0.37 0.49 0.57 0.10 0.11 0.61 0.65]
Thanks!! Prakhar