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

14 ビュー (過去 30 日間)
Adria Jose
Adria Jose 2024 年 4 月 7 日 15:33
回答済み: Star Strider 2024 年 4 月 7 日 16:05
How do I fix the error "Execution of script interp2 as a function is not supported"?

回答 (1 件)

Star Strider
Star Strider 2024 年 4 月 7 日 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.
.

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

タグ

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by