필터 지우기
필터 지우기

Is the z-axis in a Sphere only positive?

조회 수: 2 (최근 30일)
민제 강
민제 강 2022년 9월 5일
댓글: Chunru 2022년 9월 5일
[X, Y, Z] = sphere(10);
Points = [X(:), Y(:), Z(:)].';
plot3(Points(1,:), Points(2,:), Points(3,:), 'x');
I want to get points by representing only the positive z-axis.

채택된 답변

Chunru
Chunru 2022년 9월 5일
편집: Chunru 2022년 9월 5일
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
Name Size Bytes Class Attributes Points 3x10201 244824 double X 101x101 81608 double Y 101x101 81608 double Z 101x101 81608 double cmdout 1x33 66 char
figure
idx = 51:101;
surf(X(idx, :), Y(idx, :), Z(idx, :))
  댓글 수: 2
민제 강
민제 강 2022년 9월 5일
So, I want to make it a hemisphere with only positive values on the z-axis.
Chunru
Chunru 2022년 9월 5일
See the update.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Gamma Functions에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by