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

조회 수: 8 (최근 30일)
lavanya manikonda
lavanya manikonda 2019년 1월 9일
편집: Adam Danz 2019년 1월 9일
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