请问各位大佬们,画图如何画出图1的结果啊,我用了别人的程序处理的数据,还需要修改什么地方吗
A = xlsread('C:\Users\51558\Desktop\result.xlsx');
%%%%%%%%%%获取矩阵大小%%%%%%%%%%
[m,n]=size(A);
C = A(2:m,2:n);
%%%%%%%%%%创建高度%%%%%%%%%%%%%%
height=linspace(7.5*m,7.5,m);
%%%%%%%%%%创建自定义时间%%%%%%%%
t0=datenum(2018,11,11,1,12,37);
dt=1/(24*12);
tf=t0 + dt*(n-1);
T=t0:dt:tf;
dv=datevec(T);
%%%%%%%%%%%%%出图
figure;imagesc(T,height,C);
%figure;plot(T,AOD);
colorbar
xlabel('时间(BJS)');
ylabel('高度/米')
title('消光系数时序图')
set(gca,'YDir','normal');%y轴正常显示
dateaxis('X',13);%时间显示格式
colormap(jet);%改动颜色,保存当前颜色条
caxis('auto');
|