1
In my MATLAB program I have to run a for loop for 500 times and each time the loop runs it plots a graph, so If I run the program there will be 500 (.fig files) and that may hang my system.
So is there any way that I can save the output which are produced after each loop automatically in some folder?.
If there is some procedure, a reference to that procedure will be very much helpful!.
how to change the name of the file in each iteration, like barchart1,barchart2,barchart3,... ?? – BAYMAX – 2018-01-17T16:25:40.430
@BAYMAX: You can, for example, use
sprintf
to do this. I added an example in the answer. – Shaido - Reinstate Monica – 2018-01-18T01:14:45.360