MATLAB: How to extract tick label in sequence data

label;tick

I have irregular sequence data as:
2019/1/1 3:00:00, 1
2019/1/1 4:00:00, 2
2019/1/2 3:00:00, 3
2019/1/2 5:00:00, 4
2019/1/2 6:00:00, 5
2019/1/2 7:00:00, 6
2019/1/3 2:00:00, 7
2019/1/3 3:00:00, 8
2019/1/3 4:00:00, 9
2019/1/4 3:00:00, 10
2019/1/4 4:00:00, 11
2019/1/5 1:00:00, 12
2019/1/5 3:00:00, 13
and I want to extract the following tick labels and their position when I plot the data
position label
1 1/1
3 1/2
7 1/3
10 1/4
12 1/5

Best Answer

What do you mean you want to extract them? Do you mean set them?
Look at the xticks and xticklabels functions.
x = linspace(0,10);
y = x.^2;
plot(x,y)
xticks([0 5 10])
xticklabels(["x = 0","x = 5","x = 10"])