I am plotting data vs time, however there is a line that connects the first and last points, how do I get rid of this line?
Relevant code:
data = load('AMT_CO2.txt');
time = data(:,1);
avg = data(:,2);
plot(time, avg);
plot(time(1:end-1), avg(1:end-1))
Please note that this question has been asked here: Line between first and last point however, this doesn't have an answer
There is also a question: Removing the line between two specific data points in Matlab however, I tried not plotting the last point and I get the same line