I have 1000 .dat files and I want to plot graphs from them and save the results in .png format for all the files. How do we do that?
Neeta Dsouza answered .
2025-11-20
figure
hold on
datfiles = dir('*.dat');
for K = 1 : length(datfiles)
data = load(datfiles(k).name); %load just this file
% Plot the data depending on variables
end