compiler 'attempt to run script as function'
이전 댓글 표시
I'm trying to call a few instances of Matlab code using Matlab compiler. I'm calling fom the shell, and using the process ID as an index to run different operations, so my compiled code is something like this:
function myFunction(num)
% do something
return
However, I keep getting the error, "Attempt to execute SCRIPT as a function"
According to what I've seen, this should meet the definition of a function. It it something to do with the compiler? If so, how can I get this to work? Help please!!
댓글 수: 4
Walter Roberson
2021년 11월 19일
Try "clear" and the function name if it was a script before in the same session.
Yongjian Feng
2021년 11월 19일
Also try:
which myFunction
This will tell you what matlab thinks myFunction should be
Renee
2021년 11월 20일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!