在Matlab中输入help set 点击gca选项
GCA Get handle to current axis.
H = GCA returns the handle to the current axis in the current
figure. The current axis is the axis that graphics commands
like PLOT, TITLE, SURF, etc. draw to if issued.
Use the commands AXES or SUBPLOT to change the current axis
to a different axis, or to create new ones.
set(gca,,,)函数的作用是在做的图上插入坐标轴的坐标标注
下面来举个例子:
首先我设置
T0=8;
T1=5;
set函数的调用格式为
set(gca,'Xtick',[-T0,-T1/2,T1/2,T0]);
set(gca,'XTickLabel',{'-T0','-T1/2','T1/2','T0'});