做信号分解的时候需要用到的,让多个子图都共用一个x轴
t = 0:0.01:1;
x = sin(t);
y = cos(t);
figure;
subplot(2,1,1);
plot(t,x);
ylabel('Amplitude');
title('Sine Wave');
grid on;
set(gca,'XTickLabel',[]);%去掉第一个子图的x轴刻度
subplot(2,1,2);
plot(t,y);
xlabel('Time (s)');
ylabel('Amplitude');
title('Cosine Wave');
grid on;