Help adding external functions
Mostrar comentarios más antiguos
Whenever I try to add an external function to my script (written as "external functions: X, Y, Z"), my script keeps syaing that these functions are unrecognized, despite the scripts working on their own even when plugged directly into the main script. If anyone knows how to get these external scripts to run, I would appreciate it
4 comentarios
Voss
el 10 de Dic. de 2021
Can you please post the complete text of the error/warning message(s) you get?
Walter Roberson
el 10 de Dic. de 2021
At the moment I do not recall anywhere that uses the syntax "external functions: " followed by a list ?
Could you clarify what it is you are doing, perhaps posting a link to the documentation for that aspect ?
Anthony Koning
el 11 de Dic. de 2021
Walter Roberson
el 11 de Dic. de 2021
Lines beginning with % are just comments. That bit about External Function is there as documentation.
function statements cannot be executed at the command line.
If you have an old enough version of MATLAB, then functions cannot occur inside of "script" files either. Files that are .m files that do not start with the word function or classdef are considered "script" files.
Respuesta aceptada
Más respuestas (1)
Chunru
el 11 de Dic. de 2021
0 votos
MATLAB has no external function like c and other languages. It relies on "path" to figure out the external functions. You can still put a comments for external functions to indicate that the current function relies on some other functions.
MATLAB also has more advanced features for managing the data and functions for a project. Search "Projects" in dcouments for more info. If you want to put your software into a better management, refere to class and packages.
Categorías
Más información sobre Entering Commands en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!