MATLAB: How to plot different figures from the same matrix

plot

Hi!
I have a matrix with 1376×3 dimensions. First column is the day, second the time and third my measurements. The matrix is:
8 7.56 316
8 8.45 319.56
8 10.78 317.4
9 12.76 323.98
9 14.27 356.89
10 13.45 346.12
10 14.2 312.43
and so on, until the day 365. (some days are missing).
I want to plot the second and third columns for each day separately.
Any ideas?
Thank you!

Best Answer

Try this
D = [
8 7.56 316
8 8.45 319.56
8 10.78 317.4
9 12.76 323.98
9 14.27 356.89
10 13.45 346.12
10 14.2 312.43]
uniqueDays = unique(D(:,1));
numberUniqueDays = numel(uniqueDays);
for nd = 1:numberUniqueDays
indexToThisDay = D(:,1)==uniqueDays(nd);
figure
plot(D(indexToThisDay,2),D(indexToThisDay,3))
end