Want to run same script for 100 times without changing any variable and then taking the average of the output.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Prashant Bhagat
am 17 Aug. 2022
Kommentiert: Prashant Bhagat
am 18 Aug. 2022
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 Kommentare
Akzeptierte Antwort
David Hill
am 17 Aug. 2022
for k=1:100
yourScript;
Output(k)=y;%whatever variable that is the output
end
m=mean(Output);
plot(Output);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!