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

How can I call a separate function m-file within a for-loop of another m-file? Both are saved in the same path.

 Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 30 de Sept. de 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

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 30 de Sept. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by