zh3611 发表于 2009-6-5 22:36

知xyz坐标数据怎么绘成三维图

现在知道xyz坐标的数据
怎么回成三维图啊?
急急急!!!
谢谢

波波球 发表于 2009-7-9 12:13

a=load('数据.txt');
plot3(a(:,1),a(:,2),a(:,3))

logxing 发表于 2009-7-10 10:37

画点可以,要是面的话有通用算法吗?稍后我也要面对这个问题

5623728 发表于 2009-8-3 17:20

load w.dat;
xline=linspace(0,0.1,30);
yline=linspace(0,0.1,30);
=meshgrid(xline,yline);
Z=griddata(w(:,1),w(:,2),w(:,3),X,Y);
surf(Y,X,Z);

ChaChing 发表于 2009-8-3 22:33

楼上的稍作修饰
load w.dat;
maxX=max(w(:,1)); minX=min(w(:,1));
maxY=max(w(:,2)); minY=min(w(:,2));
xline=linspace(minX,maxX,30);
yline=linspace(minY,maxY,30);
=meshgrid(xline,yline);
Z=griddata(w(:,1),w(:,2),w(:,3),X,Y);
surf(Y,X,Z);

吴松 发表于 2010-7-18 12:07

回复 5楼 ChaChing 的帖子

我有一组数据:w=[-0.298809,0.913112,-0.371000,
-0.124810,0.652112,-0.024000,
-0.298809,0.391113,0.085000,
-0.298809,0.130113,0.107000,
-0.298809,0.065113,0.085000,
-0.298809,-0.369887,0.210000,
-0.298809,-0.412887,0.124000,
-0.298809,-0.564888,0.142000,
-0.298809,-0.673888,0.150000,
-0.298809,-0.738888,0.107000,
-0.298809,-0.999888,0.063000,
-0.081810,0.891112,-0.371000,
0.158190,0.761112,-0.328000,
0.136190,0.478112,-0.111000,
0.311191,0.391113,-0.328000,
0.223190,0.130113,-0.111000,
0.092190,0.226113,0.030000,
-0.168810,0.130113,0.107000,
0.092190,0.174113,0.030000,
0.005190,0.077113,-0.002000,
0.171190,0.000113,-0.111000,
0.005190,0.056113,0.000000,
0.005190,-0.025887,0.000000,
-0.168810,0.000113,0.000000,
0.005190,-0.043887,0.000000,
-0.189810,-0.304887,0.037000,
-0.124810,-0.391887,0.037000,
0.088190,-0.247887,-0.045000,
0.251190,-0.397887,-0.328000,
0.310191,0.000113,-0.328000,
0.171190,-0.747888,-0.328000,
-0.052810,-0.608888,0.000000,
-0.124810,-0.956888,0.000000,
-0.255809,-0.543888,0.150000,
-0.472810,0.652112,-0.024000,
-0.298809,0.391113,0.085000,
-0.298809,0.130113,0.107000,
-0.298809,0.065113,0.085000,
-0.298809,-0.369887,0.210000,
-0.298809,-0.412887,0.124000,
-0.298809,-0.608888,0.124000,
-0.298809,-0.673888,0.150000,
-0.298809,-0.738888,0.107000,
-0.298809,-0.999888,0.063000,
-0.515810,0.891112,-0.371000,
-0.755809,0.761112,-0.328000,
-0.733810,0.478112,-0.111000,
-0.908809,0.391113,-0.328000,
-0.820809,0.130113,-0.111000,
-0.689810,0.226113,0.030000,
-0.428810,0.130113,0.107000,
-0.689810,0.174113,0.030000,
-0.602810,0.077113,-0.002000,
-0.768809,0.000113,-0.111000,
-0.602810,0.056113,0.000000,
-0.602810,-0.025887,0.000000,
-0.428810,0.000113,0.000000,
-0.602810,-0.043887,0.000000,
-0.407809,-0.304887,0.037000,
-0.472810,-0.391887,0.037000,
-0.685810,-0.247887,-0.045000,
-0.848809,-0.397887,-0.328000,
-0.907809,0.000113,-0.328000,
-0.768809,-0.747888,-0.328000,
-0.544810,-0.608888,0.000000,
-0.472810,-0.956888,0.000000,
-0.341809,-0.543888,0.150000,
0.049190,0.052113,-0.030000,
0.049190,-0.032887,-0.030000,
-0.646810,0.052113,-0.030000,
-0.646810,-0.032887,-0.030000,
-0.033810,0.052113,-0.030000,
-0.033810,-0.032887,-0.030000,
-0.563810,0.052113,-0.030000,
-0.563810,-0.032887,-0.030000,
-0.218809,-0.367887,0.150000,
-0.378809,-0.367887,0.150000,
-0.276809,0.065113,0.063000,
-0.320809,0.065113,0.063000,
-0.175809,-0.557888,0.063000,
-0.421809,-0.557888,0.063000,
-0.198809,-0.608888,0.050000,
-0.398809,-0.608888,0.050000,
-0.198809,-0.608888,0.050000,
-0.398809,-0.608888,0.050000,
-0.175809,-0.655888,0.063000,
-0.421809,-0.655888,0.063000,
-0.298809,-0.608888,0.124000,
-0.098810,-0.608888,-0.024000,
-0.498810,-0.608888,-0.024000,
0.058190,-0.608888,-0.050000,
-0.655810,-0.608888,-0.050000,
-0.233809,-0.119887,0.050000,
-0.363809,-0.119887,0.050000,
-0.298809,-0.079887,0.100000,
0.088190,0.053113,-0.056000,
-0.685810,0.053113,-0.056000,
0.088190,0.038113,-0.056000,
-0.685810,0.038113,-0.056000,
0.088190,-0.021887,-0.056000,
-0.685810,-0.021887,-0.056000,
0.088190,-0.030887,-0.067000,
-0.685810,-0.030887,-0.067000,
-0.081810,0.053113,-0.013000,
-0.515810,0.053113,-0.013000,
-0.081810,0.038113,-0.013000,
-0.515810,0.038113,-0.013000,
-0.081810,-0.021887,-0.013000,
-0.515810,-0.021887,-0.013000,
-0.081810,-0.030887,-0.024000,
-0.515810,-0.030887,-0.024000,
-0.178810,-0.412887,0.100000,
-0.418809,-0.412887,0.100000]
请您帮忙看看是否可以通过径向基函数插值出3维面
不胜感激

ChaChing 发表于 2010-7-18 17:41

回复 6楼 吴松 的帖子

径向基函数插值? 不明白

吴松 发表于 2010-7-18 18:07

回复 7楼 ChaChing 的帖子

通过三维插值来画出这些数据得三维平面图可以不啊?

ChaChing 发表于 2010-7-18 23:18

回复 8楼 吴松 的帖子

5F不是给了代码?:loveliness:

zhenzhy 发表于 2011-4-8 11:29

学习了,plot3可以画三维曲线,再修饰下就行
页: [1]
查看完整版本: 知xyz坐标数据怎么绘成三维图