![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281871/image.png)
How do I move the position of axis?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
clc,clear all
A1 = 0.015; %Excitation Amplitude
A2 = 0.035;
A3 = 0.06;
l_r = 0.617; %Wave length of the road
v = 10; %Speed(m/s)
P = l_r/v; %Period
Om = 1/P*2*pi; %Forcing Frequency
%Om = %0.07m,2m,45m/s
%Om = 9.512/(2*pi);
k_l = 26400; %Linear stiffness
m = 483; %Mass
d = -0.5; %Stretching condition
l = 0.5; %Length of the spring
k_s = -(k_l*(l-d))/(4*d); %Spring stiffness
f_n = sqrt(k_l/m)/(2*pi); %Natural frequency
%%
fig = figure();
ax = axes();
hold(ax);
view([45 85]);
grid on
l_array = 0.1:0.1:1; %Excitation Amplitude
T = 80;
x0 = [0,0];
for i=1:numel(l_array)
l = l_array(i);
f = @(t,x) [ x(2); ...
-(2*k_s*(x(1)-(A1*sin(Om*t)+A2*sin(2*Om*t)+A3*sin(3*Om*t)))* ...
(sqrt((l-d)^2 + (x(1)-(A1*sin(Om*t)+A2*sin(2*Om*t)+A3*sin(3*Om*t)))^2) - l))/ ...
(m*(sqrt((l-d)^2 + (x(1)-(A1*sin(Om*t)+A2*sin(2*Om*t)+A3*sin(3*Om*t)))^2))) ];
[t, x] = ode45(f,[0,T],x0);
%Response_amp = max(x(:,1)) - min(x(:,1));
plot3(t, l*ones(size(t)), x(:,1), 'LineWidth', 1);
end
xlabel('Time (s)', 'Fontsize', 14)
ylabel('Length (m)', 'Fontsize', 14)
zlabel('Response Amplitude (m)', 'Fontsize', 14)
ax = gca;
ax.XAxis.FontSize =14;
ax.YAxis.FontSize =14;
ax.ZAxis.FontSize =14;
%set(gca,'FontSize',12)
Hi, I wish to move the postion of z-axis (Response Amplitude in this case) to the left so that I can see the Ztick values more clearly. Also, how do I make the size of x,y and z tick labels as bigger? Thank you for your time.
0 commentaires
Réponses (1)
Image Analyst
le 4 Avr 2020
Click the little spin circle icon above the plot and spin it around:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281871/image.png)
0 commentaires
Voir également
Catégories
En savoir plus sur Directed Graphs dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!