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

5 次查看(过去 30 天)
DO YOU GET ME?
PLEASE ANSWER
  1 个评论
Luna
Luna 2019-1-9
编辑:Luna 2019-1-9
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?

请先登录,再进行评论。

回答(1 个)

Adam Danz
Adam Danz 2019-1-9
编辑:Adam Danz 2019-1-9
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

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by