clear; close all % % COEN45 lab 5, cantilever beam % len = %% length, feet len = 12*len; %% in E = %% modulus of steel, psi I = %% in^4 % % load condition 1 % w = %% lb/ft w = w/12; %% lb/in [M,V,y,x] = cbeam(len,E,I,w); figure subplot(3,1,1); plot(x,M); title('Load condition 1'); xlabel('distance, in.'); ylabel('moment, in-lb'); grid subplot(3,1,2); plot(x,V); xlabel('distance, in.'); ylabel('shear, lb'); grid subplot(3,1,3); plot(x,y) xlabel('distance, in.'); ylabel('displacement, in'); grid % % load condition 2 % w = 0; P = xP = [M,V,y,x] = cbeam(len,E,I,w,P,xP); figure subplot(3,1,1); plot(x,M); title('Load condition 2'); xlabel('distance, in.'); ylabel('moment, in-lb'); grid subplot(3,1,2); plot(x,V); xlabel('distance, in.'); ylabel('shear, lb'); grid subplot(3,1,3); plot(x,y) xlabel('distance, in.'); ylabel('displacement, in'); grid