https://ww2.mathworks.cn/help/matlab/ref/xticks.html
% 指定x轴刻度值和标签
x = linspace(0, 10);
y = x.^2;
plot(x, y)
xticks([0 5 10])
xticklabels({'x = 0', 'x = 5', 'x = 10'})
% 指定非均匀x轴刻度值 用数值标注刻度线
x = linspace(-5, 5);
y = x.^2;
plot(x, y)
xticks([-5 -2.5 -1 0 1 2.5 5])
% 沿x轴以10为增量显示刻度线,从0开始,在50结束。
x = linspace(0,50);
y = sin(x/2);
plot(x,y)
xticks(0:10:50)