How to change the options in the figure of z-axis?

조회 수: 1 (최근 30일)
Myo Gyi
Myo Gyi 2018년 11월 10일
댓글: Myo Gyi 2018년 11월 10일

채택된 답변

madhan ravi
madhan ravi 2018년 11월 10일
편집: madhan ravi 2018년 11월 10일
function main
%Set initial values for r, theta, z
r00 = 10;
theta00 = 0;
z00 = 1.0;
y0 = [r00 theta00 z00];
% Set model parameters
z0 = 0.0;
a = 0.2;
gamma_inf = 1000.0;
nu = 1.3;
% Set integration period
tspan = 0:0.001:10;
% Call integrator
fun = @(t,y)[-a*y(1);gamma_inf/(2*pi*y(1)^2)*(1-exp(-a*y(1)^2/(2*nu)));2*a*(y(3)-z0)];
[T Y] = ode45(fun,tspan,y0);
R = Y(:,1);
THETA = Y(:,2);
Z = -Y(:,3);
[x y] = pol2cart(THETA,R);
h=plot3(x,y,Z,'r', 'LineWidth', 1')
hold on;
plot3 ([0,0],[0,0],[Z(end),0],'--b')
grid on
xlabel x-axis
ylabel y-axis
zlabel z-axis
zticklabels({'0','10','20','30','40','50','60'})
set(h,'Zdir','reverse')
hold off
  댓글 수: 11
madhan ravi
madhan ravi 2018년 11월 10일
Anytime :) make sure to accept the answer if it was what you were looking for
Myo Gyi
Myo Gyi 2018년 11월 10일
Yes sir

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by