How to make griddatan faster?

2 views (last 30 days)
John R.
John R. on 24 Feb 2016
Edited: John R. on 24 Feb 2016
Hello,
I have a 5D gridded data set that is generated by sweeping through 5 input vectors, running an external program with these inputs, and then recording the output. This results in about 100,000 points. Approximately 1000 of these points fail to run in the external program, resulting in NaN's within the data set (usually near the outside).
I am attempting to use griddatan to "fill in" as many of these faulty points as possible. With a much reduced data set, this seems to work very well. However, with the full data set, this process is incredibly slow. I let it run for 24 hours and it did not complete; I had to cancel prematurely.
The code is something along these lines...
goodInput = [999000 x 5] matrix of inputs that resulted in good data
goodData = [999000 x 1] matrix of good data
badInput = [1000 x 5] matrix of inputs that resulted in bad data (NaN's)
fixedData = griddatan(goodInput, goodData, badInput)
The end result will be a 5D griddedInterpolant that is a "metamodel" of the external program. By removing as many of the NaN's as possible, interpolation using the interpolant will be more successful.
Is the a better approach to this?
Thank you!

Answers (0)

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!