Want to run same script for 100 times without changing any variable and then taking the average of the output.
2 ビュー (過去 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!