Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
rick
rick am 30 Sep. 2011
How can I call a separate function m-file within a for-loop of another m-file? Both are saved in the same path.

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 30 Sep. 2011
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

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by