How to generate?

2 views (last 30 days)
Beginner Boy
Beginner Boy on 12 Jan 2022
Edited: Beginner Boy on 28 Sep 2023
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

Accepted Answer

Star Strider
Star Strider on 12 Jan 2022
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 Comments
Beginner Boy
Beginner Boy on 14 Jan 2022
It's work!
Thanks again for your help!
Star Strider
Star Strider on 14 Jan 2022
As always, my pleasure!
.

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Objects in Help Center and File Exchange

Tags

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!