Can I save the interpolant from scatteredInterpolant or griddedInterpolant

I have a database as a 2D matrix which I interpolate using scatteredInterpolant. Then I query the interpolant over a set of points. I would like to ask if it is possible to save the interpolant generated by scatteredInterpolant or griddedInterpolant for future use, so I can load it in the workspace and avoid to recalculate it every time I want to do a different query. I tried to save it as mat file but when I load it in the workspace I get a warning and I can't query the interpolant:
F = scatteredInterpolant(X,Y,Z);
save('F','F')
clear F
load F
Variable 'F' originally saved as a scatteredInterpolant cannot be instantiated as an object and will be read in as a uint32.
Thank you in advance
Isabella

3 Comments

That's very strange. I have no such difficulty in R2013b, either with scatteredInterpolant or griddedInterpolant. What MATLAB version are you using?
Was your attempt to reload F in the same MATLAB session/version in which you created it?
Dear Matt, thank you for your answer. I use R2013a 8.1.0.604 under win 64. I closed and reopened MATLAB and the error disappeared.

Sign in to comment.

Answers (0)

Categories

Asked:

on 21 Jan 2014

Commented:

on 21 Jan 2014

Community Treasure Hunt

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

Start Hunting!