Attempt to execute SCRIPT <filename> as a function
이전 댓글 표시
Hi all, I am a new user of Matlab. Im learning how to debug a .m file called "test.m". I was asked to copy one backup, I made the name "test_debug.m". When I run the test_debug.m file, there is a error msg,
Attempt to execute SCRIPT test as a function: D:\ProgramFiles\Reference_src\test.m
test.m is not in path. But it could still successful run. It has called several functions inside the script. What should I add into/make changes for test_debug.m?
Thank you!
댓글 수: 3
zakria qadir
2020년 8월 13일
i am getting this error?
Attempt to execute SCRIPT newplot as a function:
D:\MATLAB\R2017a\toolbox\matlab\graphics\newplot.m
Error in contour (line 66)
cax = newplot(cax);
Error in PSO_simulation (line 19)
contour(x_new, y_new, z , 20);
>>
Image Analyst
2020년 8월 14일
Chances are you named your m-file after a built-in function. Attach your m-file with the paper clip icon in a new question.
Walter Roberson
2020년 8월 14일
You would get that error message if you had accidentally corrupted newplot.m such as accidentally typing in a few characters before the 'function' line.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!