Title Beam deflection Problem A beam is simply supported at
     Title: Beam deflection.  Problem: A beam is simply supported at both ends is loaded as shown in the figure below. Under the load, the beam will deflect vertically. This vertical deflection of the beam. V will vary along the length of the beam from x=0 to L and is given by V = Pb/6EIL[(-L^2 + b^2)x + x^3],0  
  
  Solution
% Beam Deflection
 clear all
 clc
 fprintf(\'Title:Beam Deflection\ \');
 %diamensions of beam
 L=6; %Total length of the beam
 a=4;%shown in figure
 b=2;%shown in figure
 d; %length of side of each edge, you have not given the value write here
 E=180 e109;  %young\'s Modulus
 P=2000; %load
 I= (d^3)/3; % Moment of inertia
 j=0;
 for x=0:1:L
     j=j+1;
     if x<a
 V(j)=(P*b)(((-L*L)+(b*b))*x+(x*x*x)) / (6* E*I*L);
fprintf(\'Title:Beam Deflection\ \',V(j));
V(j)=0;
     else
V(j)=(P*b)(((-L*L)+(b*b))*x+(x*x*x) - L*((x-a)^3)/b) / (6* E*I*L);
   
   fprintf(\'Title:Beam Deflection\ \',V(j));
   

