Employ the subplot function to display all the plots on the same figure window.
Afficher commentaires plus anciens

2 commentaires
the cyclist
le 26 Sep 2019
In the back of my mind, for some reason, I have a nagging suspicion that this might be a homework problem.
What have you tried? What is your question?
Réponses (1)
Bruno Teramoto
le 26 Sep 2019
0 votes
wo = 2.5;
E = 50000;
L = 600;
I = 30000;
delx = 10;
x = [0:delx:L];
y = (wo/(120*E*I*L))*(-(x.^5) + 2*L^2*x.^3 - x*L^4);
theta = (wo/(120*E*I*L))*(-(5*x.^4) + 6*L^2*x.^2 - L^4);
mo = (wo/(120*L))*(-(20*x.^3) + 12*L^2*x);
s = (wo/(120*L))*(-(60*x.^2) + 12*L^2);
subplot(2,2,1),plot(x,y)
grid
title('Beam Deformation')
ylabel('Displacement')
xlabel('Distance along Beam (cm)')
subplot(2,2,2),plot(x,theta)
grid
title('Slope')
ylabel('Slope')
xlabel('Distance along Beam (cm)')
subplot(2,2,3),plot(x,mo)
grid
title('Moment')
ylabel('Moment')
xlabel('Distance along Beam (cm)')
subplot(2,2,4),plot(x,s)
grid
title('Shear')
ylabel('Shear')
xlabel('Distance along Beam (cm)'
Catégories
En savoir plus sur Signal Attributes and Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!