How to run an algorithm 5 times and graph all 5 runs in one grid
2 views (last 30 days)
I have an iterative algorithm that outputs a graph (decaying function) recording progress of a function during the iteration.
I want to run this algorithm 5 times (knowing that each time I run it the output is different) which should output 5 graphs each time I run it but I want these 5 graphs to be plotted in one grid axis. I hope someone can guide me for this problem.
Prateek Rai on 19 Aug 2021
To my understanding, you want 5 different graphs to be plotted on one grid axis.
You can use the hold on command to combine plots in the same axes. This will retain plots in the current axes so that new plots added to the axes do not delete existing plots. When you plotted all the 5 graphs on the same axes, you can then use the hold off command to set the hold state to off .