HW7Solutions - % matlab code to plot parts c and d...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % matlab code to plot parts c and d plot(x,u,'k') hold on plot(x,u1,'b') plot(x,u3,'r') hold off legend('exact','1st and 2nd order','3rd order') xlabel('x/L') ylabel('u/u_m_a_x') figure(2) plot(x,F,'k') hold on plot(x,F1,'b') plot(x,F3,'r') hold off legend('exact','1st and 2nd order','3rd order') xlabel('x/L') ylabel('F/F_m_a_x') 1.4 exact 1st and 2nd order 3rd order 1.2 1 0.8 u/umax 0.6 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 x/L 0.6 0.7 0.8 0.9 1 Mathematica for part D In[41]:= u= Lqx 2 AE − q x2 2 AE ; In[42]:= Out[42]= F = [email protected] ∂x uD u1 = 1 q HL − 2 xL 2 AE 4 L2 q Sin@ π3 AE πx L In[43]:= In[44]:= u3 = In[45]:= Out[45]= F1 = AE ∂x u1 In[46]:= Out[46]= F3 = [email protected] ∂x u3D SimplifyA 1− 2x L SimplifyA 8 Cos@ π2 πx L 4 L q Cos@ πLx D π2 4 L q H9 Cos@ 4 L2 q Sin@ π3 πx L D ; 4 L2 q Sin@ 27 AE 3πx L π3 D + D ; πx L 2 In[47]:= π D + Cos@ 3 L x DL 2 9π Lq Out[47]= FE 2 Lq In[48]:= Out[48]= In[50]:= Out[50]= FullSimplifyA 8 H9 Cos@ πx L D F1E 2 Lq F3E D + Cos@ 9 π2 3πx L DL 1 exact 1st and 2nd order 3rd order 0.8 0.6 0.4 0.2 F/Fmax 0 -0.2 -0.4 -0.6 -0.8 -1 0 0.1 0.2 0.3 0.4 0.5 x/L 0.6 0.7 0.8 0.9 1 ...
View Full Document

This note was uploaded on 04/14/2011 for the course ASE 321K taught by Professor Dr.markmear during the Spring '06 term at University of Texas.

Ask a homework question - tutors are online