필터 지우기
필터 지우기

How can i merge all my plots?

조회 수: 2 (최근 30일)
salvador r
salvador r 2015년 5월 15일
편집: Walter Roberson 2015년 5월 15일
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일
I am not sure how you want to merge those but try using the 'hold on' function.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by