use a Subroutine in a for loop
조회 수: 10 (최근 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!