作业帮 > 综合 > 作业

matlab画等高线问题,请高人解答.详细请看补充.

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/12 05:28:15
matlab画等高线问题,请高人解答.详细请看补充.
有319个观测点,每个观测点有重金属的浓度值,想做出重金属浓度值关于x,y坐标的等高线.
x(319,1),y(319,1),ci(319,1),x,y作为自变量,ci作为函数,做ci的等高线.
matlab画等高线问题,请高人解答.详细请看补充.
clc;x=qu(:,9)';
y=qu(:,10)';
z=qu(:,11)';
%scatter(x,y,5);
%title('取样点');
xi=linspace(min(x),max(x),50);
yi=linspace(min(y),max(y),50);
[xi,yi]=meshgrid(xi,yi);
zi=griddata(x,y,z,xi,yi,'v4');
%figure;
%contourf(xi,yi,zi,50)
%title('等高线');
%hold on;
figure;
mesh(xi,yi,zi)
title('海拔图');
for i=1:8
x=qu(:,9)';
y=qu(:,10)';
z=qu(:,i)';
%scatter(x,y,5);
%title('取样点');
xi=linspace(min(x),max(x),50);
yi=linspace(min(y),max(y),50);
[xi,yi]=meshgrid(xi,yi);
zi=griddata(x,y,z,xi,yi,'v4');
%figure;
%contourf(xi,yi,zi,50)
%title('等高线');
%hold on;
figure;
axis
surfl(xi,yi,zi)
title('浓度图');
shading interp
end