- Save the code as new function file say fun1
- In the Main script use loop to run it multiple times
repeat many time same script
13 ビュー (過去 30 日間)
古いコメントを表示
I want to execute the following script 10 times. Is it possible to run this script first as function, and open this function in another m-file? Do you know another method how I can repeat this script 10 times?
The m-file is attachted.
Thanks for your support!
Elisabeth Brandner
0 件のコメント
回答 (1 件)
KALYAN ACHARJYA
2019 年 12 月 1 日
編集済み: KALYAN ACHARJYA
2019 年 12 月 1 日
As per knowledge, your above stated direction is best.
for i=1:10
result=fun1()
end
The output of the code can be save in array or cell array depending on output arguments of the function file
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!