matlab画三维图、提取excel数据

filepath='E:\something\mess\Precipition NMC-V1.xlsx';
[NUM1]=xlsread(filepath,1,'B3:D21');
% [NUM2]=xlsread(filepath,1,'B25:D43');
% [NUM3]=xlsread(filepath,1,'B47:D65');
% [NUM4]=xlsread(filepath,1,'B69:D87');
% [NUM5]=xlsread(filepath,1,'B91:D109');
% [NUM6]=xlsread(filepath,1,'B113:D131');
% [NUM7]=xlsread(filepath,1,'B135:D153');
% [NUM8]=xlsread(filepath,1,'B157:D175');
% [NUM9]=xlsread(filepath,1,'B179:D197');

figure(1)
plot3(NUM1(:,1),NUM1(:,2),NUM1(:,3),'MarkerSize',50);
 figure(2)
 scatter(NUM1(:,1),NUM1(:,2),5,NUM1(:,3));
figure(3)
scatter3(NUM1(:,1),NUM1(:,2),NUM1(:,3),300,'r*');%前面是大小,后面是颜色和图形

% figure
% x=NUM1(:,1);y=NUM1(:,2);z=NUM1(:,3);
% [X,Y,Z]=griddata(x,y,z,linspace(min(x),max(x))',linspace(min(y),max(y)),'v4');%插值
% pcolor(X,Y,Z);shading interp%伪彩色图
% figure,contourf(X,Y,Z) %等高线图
% figure,mesh(X,Y,Z)%三维曲面

你可能感兴趣的:(matlab)