‘Trying to display correlogram as the picture seen below what do I have to add to my code:’
The plot in the documentation is a stem plot. I plotted that originally, however the data are so densely packed that it simply appears as a filled area below the curve (even when using '.' as the marker).
One option would be to select a subset of values and plot them —
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/838945/glucose.csv');
date_time = T1.date + T1.time;
glucose_mgdl = glucose * 18;
title('Glucose readings vs days/time')
[r,lags] = xcorr(glucose_mgdl,'coeff');
lagss = lags(1:sampstep:end);
Change the value of ‘sampstep’ to get different stem plot results.