How to call a function m-file within another m-file
3 次查看(过去 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.
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!