How can I plot three 2D functions in one 3D graph?
30 views (last 30 days)
Show older comments
Commented: Mr.Alb on 10 Feb 2022
I have three 2D graphs, i.e.:
1) x-y 2)x-z 3)y-z
I need to put them all into a single 3D graph like in this example:
Any idea how to do that?
Abolfazl Chaman Motlagh on 10 Feb 2022
a simple way i thing is using plot3:
plot3 function, plot a curve in 3D space. if you set all values of one component 0. the curve will be on plane.
for example a ploting y=f(x) on X-Y plane means it's 3D curve is on Z=0 plane.
figure; hold on; grid on
X = 0:0.01:1;
Y = sin(X);
Z = tanh(X).*X;
Y = 0:0.01:1;
Z = Y.^2;
view([0.8 1 1])
More Answers (0)
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!