How can i merge all my plots?

I made 5 figures in matlab, each with designated coordenates, but i cant seem to be able to merge them into 1, can someone help me please? the code is the following:
u=linspace(0,2*pi,50);
v=linspace(-1.5,1.5,50);
[u,v]=meshgrid(u,v);
x=(5)*cos(u).*cosh(v);
y=(5)*sin(u).*cosh(v);
z=(5)*sinh(-v)+13;
u2=linspace(0,2*pi,50);
v2=linspace(0,1.5,30);
[u2,v2]=meshgrid(u2,v2);
x2=(5)*v2.*cos(u2);
y2=(5)*v2.*sin(u2);
z2=-((5)*v2.^2/(4))+26;
r=5;
phi=linspace(0,pi,30);
theta=linspace(0,2*pi,40);
[phi,theta]=meshgrid(phi,theta);
x3=r*sin(phi).*cos(theta);
y3=r*sin(phi).*sin(theta);
z3=(r*cos(phi))+26;
x4=-5:5;
y4=-5:5;
[x4,y4]=meshgrid(x4,y4);
z4=x4.^2+y4.^2;
subplot(2,3,1);
[x5, y5, z5] = cylinder(5);
z5(2 , :) = 2;
surf(x5,y5,z5);
title('Base');
subplot(2,3,2);
surf(x,y,z);
title('Cuerpo');
subplot(2,3,3);
surf(x2,y2,z2);
title('Cuello');
subplot(2,3,4);
surf(x3,y3,z3);
title('Cabeza');
subplot(2,3,5);
surf(x4,y4,z4);
title('Corona');

回答(1 个)

Fiction
Fiction 2015-5-15

0 个投票

I am not sure how you want to merge those but try using the 'hold on' function.

类别

帮助中心File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by