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!