How to call a function m-file within another m-file

조회 수: 3 (최근 30일)
rick
rick 2011년 9월 30일
How can I call a separate function m-file within a for-loop of another m-file? Both are saved in the same path.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 9월 30일
Just call that function. If you have a function called myfun defined in myfun.m, you can call it anywhere in another m file.
a=1;
for k=1:3
myfun;
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by