MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]三维矩阵画图 (https://www.labfans.com/bbs/showthread.php?t=2359)

kindaheart 2008-04-18 09:31

[求助]三维矩阵画图
 
x=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ;1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16];
y=[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 1/2000/32*2 ; 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4 1/2000/32*4];
z=[-0.3454 0.4477 0.5294 -0.7829 0.9677 -0.2834 0.0216 -0.6654 0.3454 -0.4477 -0.5294 0.7829 -0.9677 0.2834 -0.0216 0.6654
-0.6895 0.5221 0.4809 -0.4687 0.7619 -0.0905 0.2226 -0.9144 0.6895 -0.5221 -0.4809 0.4687 -0.7619 0.0905 -0.9285 0.5169
0.3591 -0.0831 0.4400 0.1162 0.3896 -1.0241 0.9285 -0.5169 -0.3591 0.0831 -0.4400 -0.1162 -0.3896 1.0241 -0.2226 0.9144];
plot3(linspace(0,0,16),1:16,z(1,:),'b.-');hold on;
plot3(linspace(1/2000/32*2,1/2000/32*2,16),1:16,z(2,:),'r.-');hold on;
plot3(linspace(1/2000/32*4,1/2000/32*4,16),1:16,z(3,:),'g.-');hold on;:confused:
grid on
上面是我的程序,最后能画出三条曲线。可是这不是我希望的,我希望能够做出网格图,【X,Y,Z]一一对应,就像下面这个图似的

请求帮助


所有时间均为北京时间。现在的时间是 11:13

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.