How to generate?

2 次查看(过去 30 天)
Beginner Boy
Beginner Boy 2022-1-12
I'm a beginner of this program. Please help me to do the plot like figure 2 My editor note: scatter(x1,y1,z1,"filled",'*'); hold on

采纳的回答

Star Strider
Star Strider 2022-1-12
Try this —
x1 = randn(10,1); % Column Vectors
y1 = randn(size(x1));
z1 = randn(size(x1));
figure
scatter3(x1, y1, z1, 'filled')
grid on
zv = zeros(size(x1));
figure
scatter3(x1, y1, z1, 'filled')
hold on
plot3([zv x1]', [zv y1]', [zv z1]')
scatter3(0, 0, 0, 150, 'g', 'p', 'filled')
hold off
grid on
.
  4 个评论
Beginner Boy
Beginner Boy 2022-1-14
It's work!
Thanks again for your help!
Star Strider
Star Strider 2022-1-14
As always, my pleasure!
.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Objects 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by