A=[2 3 14.2743892 2.1 3.15 14.2642229 2.2 3.3 14.2108503 2.3 3.45 14.2883674 2.4 3.6 13.8931573 2.5 3.75 13.6974583 2.6 3.9 13.4649072 2.7 4.05 13.4445747 2.8 4.2 13.0671555 2.9 4.35 13.4242424 3 4.5 13.142131 3.1 4.65 13.3619744 3.2 4.8 13.1726296 3.3 4.95 13.4750732 3.4 5.1 12.67957 3.5 5.25 12.4635385 3.6 5.4 12.8663735 3.7 5.55 12.8257085 3.8 5.7 12.0454545 3.9 5.85 11.7480939 4 6 12.4622677 4.1 6.15 11.2245356 4.2 6.3 11.3668622 4.3 6.45 12.3059629 4.4 6.6 11.7595308 4.5 6.75 12.2627566 4.6 6.9 11.5371455 4.7 7.05 10.8369502 4.8 7.2 11.4087977 4.9 7.35 10.47478 5 7.5 10.9424243]; x=A(:,1);y=A(:,2);z=A(:,3); scatter(x,y,5,z)%散点图 figure [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)%三维曲面
这是一个集成的画法
原文地址:https://www.cnblogs.com/jtailong/p/10638482.html
时间: 2024-11-11 19:11:12