MATLAB: How to call a function m-file within another m-file for loopfunction How can I call a separate function m-file within a for-loop of another m-file? Both are saved in the same path. Best Answer 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:3myfun;endSee http://www.mathworks.com/help/techdoc/learn_matlab/f4-2525.html Related SolutionsMATLAB: Number of functions in a function-M file A m-file can have more than one function. MATLAB: Cannot call m-file in another m-file y = 2x + 3;2x is not a valid variable name in MATLAB, and it is not a valid way to write a number in MATLAB.Like the error message said, "Check for missing multiplication operator" Related QuestionCalling a function from s-function m-fileCall a function within another functionIs it possible to write several functions into a single m-fileHow to call m-file
Best Answer