Clear Filters
Clear Filters

How do I fix the error "Execution of script interp2 as a function is not supported"?

14 views (last 30 days)
How do I fix the error "Execution of script interp2 as a function is not supported"?

Answers (1)

Star Strider
Star Strider on 7 Apr 2024 at 16:05
You have a script that you named ‘interp2’ and that is throwing the error.
The solution is to re-name the script to something that is meaningful in the context of whatever you are using it in, and tthat does not overshadow any MATLAB function.
An easy way to find it is to run this from a script or your command window —
which interp2 -all
/MATLAB/toolbox/matlab/polyfun/interp2.m /MATLAB/toolbox/parallel/array/distributed/@codistributed/interp2.m % codistributed method /MATLAB/toolbox/parallel/gpu/gpu/@gpuArray/interp2.m % gpuArray method
That should be the only result. The additional result (that will appear when you run that) will tell you where the script file is, so you can track it down and change its file name.
.

Categories

Find more on Interpolation in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!