Add points to N-D meshgrid lookup table
3 views (last 30 days)
Show older comments
I have an enormous 6-dimensional lookup table based on the meshgrid format (with nonuniform grids) that took about 7 days to populate. I have since discovered that for one of the dimensions the range I chose was not quite large enough.
I need the LUT to extend to this larger range but would rather not wait another 1-2 weeks to repopulate an even larger table, since the values I have are fine and don't need to be thrown away.
Is there a way to extend nonuniform meshgrid data to values outside the initial grid limits? If I calculate the lookup values for the range of 6D space I need to extend it to, how do I append this to the original table such that interpn() still works correctly?
Thanks
0 Comments
Answers (1)
Matt J
on 2 Feb 2022
Edited: Matt J
on 2 Feb 2022
In modern Matlab (at least the past 10 years), there is never a need to use meshgrid for interpolation purposes. The inputs can be Grid Vectors.
Vq = interpn(X1,X2,...,Xn,V,Xq1,Xq2,...,Xqn)
This is true for both the interpolated coordinate data X1,..,Xn as well as the query coordinates Xq1,..,Xqn
2 Comments
Matt J
on 3 Feb 2022
So you just want to expolate V beyond its current boundaries? If you use griddedInterpolant (instead of interpn), you can choose one of several extrapolation methods
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!