I am writing Matlab code to open date files from a continuous air sampling instrument and could use help cleaning it up/formatting the plots correctly.
This is my code currently,
#importing data
A101 = readtable("AE33_AE33-S10-01288_20220101.dat");
A102 = readtable("AE33_AE33-S10-01288_20220102.dat");
A103 = readtable("AE33_AE33-S10-01288_20220103.dat");
A104 = readtable("AE33_AE33-S10-01288_20220104.dat");
#removing empty cells
A101=A101(~any(ismissing(A101),2),:);
A102=A102(~any(ismissing(A102),2),:);
A103=A103(~any(ismissing(A103),2),:);
A104=A104(~any(ismissing(A104),2),:);
#times
t1 = A101{:,2};
t2 = A102{:,2};
t3 = A103{:,2};
t4 = A104{:,2};
#BC data for each day
b = A101{:,56};
c = A102{:,56};
d = A103{:,56};
e = A104{:,56};
#plotting
plot(ts1, b, t2, c, t3, d, t4, e);
title('BC concentration');
xlabel('Time (hours)');
ylabel('BC concentration (ng/m3)');
ylim([0,1600]);
legend({'1/01', '1/02', '1/03', '1/04'})
As of now, the days are all overlayed, but I need to have one continuous graph with an extended time series. The time is formatted in hr:min:sec in the second column of each table already & the instrument creates a new file for each day.
Additionally, if anyone could help me with a more concise way of importing the files & removing the blank cells I would appreciate it since I'll eventually be looking at months of data. I'm not particularly knowledgeable about coding/Matlab, so I'm sure some of these are easy fixes. Thanks!