How to loop over multiple data and save the plot?
2 views (last 30 days)
I am using matlab online. I have 2000 dat files as data. Whenever I run the code, the folder appears and I have to manually select the data file. I want to loop over all the data and automatically save the plot. How to do that.
Yongjian Feng on 26 Jul 2021
files = dir("*.mat");
file = files(i);
[~, fname, ~] = fileparts(file.name);
outfile = [fname '.png'];