How to call and run one .m file in another .m file at specific place?

7 visualizaciones (últimos 30 días)
lavanya manikonda
lavanya manikonda el 9 de En. de 2019
Editada: Adam Danz el 9 de En. de 2019
DO YOU GET ME?
PLEASE ANSWER
  1 comentario
Luna
Luna el 9 de En. de 2019
Editada: Luna el 9 de En. de 2019
What is the type of your .m files? Are they scripts or functions? What do you mean by specific place is it a folder path?

Iniciar sesión para comentar.

Respuestas (1)

Adam Danz
Adam Danz el 9 de En. de 2019
Editada: Adam Danz el 9 de En. de 2019
If your m-file is a function, go to the line of code where you'd like to call the function and call it like this (in this example, the fake function has 2 outputs and 1 input)
[out1, out2] = myfunc(input);
If your m-file is a script, you just need to include the filename.
myfunc

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by