- 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!