% Program to solve toy beam % bending problem % Author: Anonymous % Date: circa 2010 %Clear everything clear all; %Clear all variables from the workspace clc; %Clear command window %Calculate reactions A = [1 1; 0 12]; B = [400; 2400]; R = A\B; %Reaction vector %Calculate sigma_x M = -600; ro = 2e-2; ri = 1e-2; I = pi*(ro^4 - ri^4)/4; sigma_x = 1e-6*M*ro/I