points clusters in 3-D
2 views (last 30 days)
Show older comments
Hi, there: I have 4000 points to be plotted around two centers with standard deviation 1 and mean 0. The center of the points must be P(x1,y1,z1) and Q(x2,y2,z2). Anybody have idea how to do this? Please help me. Thank you.
Regards' S.Giri
0 Comments
Answers (1)
Walter Roberson
on 14 May 2018
cluster_P = bsxfun(@plus, [x1, y1, z1], randn(4000,3));
scatter3(cluster_P(:,1), cluster_P(:,2), cluster_P(:,3));
However, you need to clarify what it means to have standard deviation 1 and mean 0 when there are three dimensions to consider. Is the idea that the radius should be determined by randn() and that random angles should be taken?
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!