Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
%The Monte Carlo model is used in this function to determine the mean and
%standard deviation of the maximum beam deflection if the height and width
%of the beam are normally distibuted with 0.1% std deviations at a dist. load of
%50N/m
function [avg,stdev]=montecarlo_model(Load)
q=50; %Distributed load of 50 N/m
E=7*10^9; %Young's Modulus (Pa)
L=1; %Length (m)
x=0.5; %Location where max deflection occurs
%For loop that iterates load inputs into deflection equation
for i=1:Load
b = normrnd(0.1,0.01);
h = normrnd(0.01,0.001);
I = (b*h^3)/12;
w(i) =(((q*L*(x^3))/(12*E*I)))-(((q*(x^4))/(24*E*I)))-((q*(L^3)*x)/(24*E*I));
end
avg = mean(w); %Function to find mean deflection
stdev = std(w); %Function to find standard deviation of deflection
end