how to plot multiple 3d on one graph ?

조회 수: 31 (최근 30일)
Teerapong Poltue
Teerapong Poltue 2020년 11월 5일
댓글: Richard Summers 2021년 10월 15일
I've try hold on but that isn't work. It turns out to be 2d plot
interval = [-5:0.1:5];
x = -5:0.1:5;
y = -5:0.1:5;
[X,Y] = meshgrid(x,y);
z1 = acos((cos(interval)+cos((interval).')));
z2 = acos(-(cos(interval)+cos((interval).')));
figure(1);
plot3(X,Y,z2)
figure(2);
plot3(X,Y,z1)

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 5일
Following code works fine
interval = [-5:0.1:5];
x = -5:0.1:5;
y = -5:0.1:5;
[X,Y] = meshgrid(x,y);
z1 = acos((cos(interval)+cos((interval).')));
z2 = acos(-(cos(interval)+cos((interval).')));
figure(1);
plot3(X,Y,z2)
hold on
plot3(X,Y,z1)
  댓글 수: 3
Ameer Hamza
Ameer Hamza 2020년 11월 5일
I am glad to be of help!
Richard Summers
Richard Summers 2021년 10월 15일
Helped me too, nearly a year later...
Thanks muchly

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by