Interpolating / Fitting to 3D Data
1 次查看(过去 30 天)
显示 更早的评论
Hello MATLAB support group.
I am trying to fit or interpolate a set of some 3D data on a space of (x,y,z). The data that I have are 3000 unique points at randomly scattered locations within the x-y-z space, and I would like to interpolate this data onto an arbitrarily defined and evenly spaced x-y-z grid, or to obtain a function of (x,y,z) that can be used to solve for what the data would be at any point in the space - either way is sufficient.
Say for example, our space is 100 x 100 x 100 units in the 3 dimensions, and I would like to interpolate my randomly scattered data onto an x-y-z grid spaced out by 1 unit each (an array size of 101 x 101 x 101).
The problem I am having with using interp3(X,Y,Z,V,XI,YI,ZI) is that I can not construct a 3-D array (V) from the randomly scattered points of the data that I have. As far as I know, the 3-D data to be interpolated must match the size of the meshgrid inputs. However, because my data is only at randomly scattered locations, it is impossible for me to construct a regularly spaced grid of my data values for the array V.
So it seems like interp3 is not possible for what I am trying to do, or is there a way to use interp3 to interpolate from a set of randomly scattered 3-D data? Are there any other functions available that can fit or interpolate a set of randomly scattered 3-D data?
Your help would be greatly appreciated!!
Thank you.
Regards, Adam
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!