use a Subroutine in a for loop
12 ビュー (過去 30 日間)
古いコメントを表示
I have a big Matlab Script that gives me figures and text files as output , I want to run it several times and just change a variable in it. How can I do it
1 件のコメント
回答 (1 件)
Star Strider
2016 年 9 月 12 日
You don’t give enough information for an exact reply.
I see two possibilities:
1. Create a function out of your script code and then call it with different arguments in a loop,
2. Nest it in a for loop as it currently exits, changing the variable you want in each iteration of the outer loop.
What you do depends on how your code is written and what you want to do with it.
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!