How can i call the workspace griddedinterpolant in my script ?

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!!

 Accepted 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.

1 Comment

@Steven Lord. Thanks for your answer:)
Actually your suspection was correct. I want to generate a code using a Matlab function in Simulink. As you said, it is not possible. I will try with the C/C++ code Generation.

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Release

R2017b

Tags

Community Treasure Hunt

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

Start Hunting!