compiler 'attempt to run script as function'
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 19 Nov 2021
Try "clear" and the function name if it was a script before in the same session.
Yongjian Feng
le 19 Nov 2021
Also try:
which myFunction
This will tell you what matlab thinks myFunction should be
Renee
le 20 Nov 2021
Réponses (0)
Catégories
En savoir plus sur MATLAB Compiler dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!