Want to run same script for 100 times without changing any variable and then taking the average of the output.
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all, I want to run the same script multiple times and then want to take the average of the results and plot them. Is there any way I can do that. I am new to MATLAB so if someone can suggest a simple would great. Thanks in advance.
댓글 수: 0
채택된 답변
David Hill
2022년 8월 17일
for k=1:100
yourScript;
Output(k)=y;%whatever variable that is the output
end
m=mean(Output);
plot(Output);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!