MATLAB: How can i call the workspace griddedinterpolant in the script

MATLAB

I have a gridded interpolant in my workspace. I would like to call that for my another function in matlab. I used 'coder.load', to read the workspace. But it reads only the variables. I need to read the gridvectors- that looks like 'struct'. Can anyone help in this!!

Best Answer

From the fact that you mention coder.load I suspect you want to generate code from your function using MATLAB Coder. If so, know that griddedInterpolant does not support C/C++ code generation so I'm not sure your code is going to work. You can see this by looking at the list of interpolation functions and selecting the "C/C++ Code Generation" extended capability filter in the sidebar on the left.
If you're not trying to generate code using MATLAB Coder, I think you probably want to use load instead of coder.load but you haven't given very much information about what you're trying to do so I can't be certain.