Is the z-axis in a Sphere only positive?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
[X, Y, Z] = sphere(10);
Points = [X(:), Y(:), Z(:)].';
plot3(Points(1,:), Points(2,:), Points(3,:), 'x');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1116960/image.jpeg)
I want to get points by representing only the positive z-axis.
0 commentaires
Réponse acceptée
Chunru
le 5 Sep 2022
Modifié(e) : Chunru
le 5 Sep 2022
No. It consists of both positive and negative parts.
[X, Y, Z] = sphere(100);
Points = [X(:), Y(:), Z(:)].';
%plot3(Points(1,:), Points(2,:), Points(3,:), 'x');
surf(X, Y, Z)
whos
figure
idx = 51:101;
surf(X(idx, :), Y(idx, :), Z(idx, :))
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Gamma Functions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!