how to plot multiple 3d on one graph ?

34 Ansichten (letzte 30 Tage)
Teerapong Poltue
Teerapong Poltue am 5 Nov. 2020
Kommentiert: Richard Summers am 15 Okt. 2021
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)

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 5 Nov. 2020
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 Kommentare
Ameer Hamza
Ameer Hamza am 5 Nov. 2020
I am glad to be of help!
Richard Summers
Richard Summers am 15 Okt. 2021
Helped me too, nearly a year later...
Thanks muchly

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by