如何用matlab通过散点画三维图

所有x,y,z值都是随机的,所以不知道该如何在matlab中画出三维图。请教达人。
x,y,z值如下所示:
x y z
248 0 248s
5 60 inf
15 60 inf
20 60 1459
30 60 839
45 60 570
60 60 510
90 60 373
120 60 382
180 60 312
240 60 318

25 120 inf
30 120 3030
45 120 1186
60 120 771
90 120 503
120 120 518
180 120 380
240 120 392

40 180 inf
45 180 2070
60 180 1248
90 180 853
120 180 652
180 180 447
240 180 464
请达人帮忙,最好附上具体的编程语言。谢谢!!!

A=[248 0 248;

      5 60 inf;

      15 60 inf;

      20 60 1459;

30 60 839

45 60 570

60 60 510

90 60 373

120 60 382

180 60 312

240 60 318

25 120 inf

30 120 3030

45 120 1186

60 120 771

90 120 503

120 120 518

180 120 380

240 120 392

40 180 inf

45 180 2070

60 180 1248

90 180 853

120 180 652

180 180 447

240 180 464];

>> x=A(:,1);

>> y=A(:,2);

>> z=A(:,3);

>> plot3(x,y,z,'r.');

   grid on

温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-03-17
X,Y,S) where S is a character string made from one element
from any or all the following 3 columns:

b blue . point - solid
g green o circle : dotted
r red x x-mark -. dashdot
c cyan + plus -- dashed
m magenta * star (none) no line
y yellow s square
k black d diamond
w white v triangle (down)
^ triangle (up)
< triangle (left)
> triangle (right)
p pentagram
h hexagram

For example, PLOT(X,Y,'c+:') plots a cyan dotted line with a plus
at each data point; PLOT(X,Y,'bd') plots blue diamond at each data
point but does not draw any line.

祝你学习愉快!追问

不好意思。这是二维的线段。
至于三维的线段,大概也清楚该怎么做。可是三维的实心图,实在不知道该怎么画出来

第2个回答  2020-12-30

本视频展示如何用matlab绘制散圆状态图,可用于相关科研数据绘图!

第3个回答  2011-03-17
没有时间 给你个函数你看看是你想要的么
stem3(x,y,z,option)这个是花空心小圆圈,并连接一条线段到x坐标轴 option可选参数,线形颜色等等
stem3(x,y,z,'filled')这个是连接到xy轴
你可以看看help里面
相似回答