Permalink
Cannot retrieve contributors at this time
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?
me3255_group9/montecarlo_support.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
16 lines (16 sloc)
469 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [mean1, stand_dev ]=montecarlo_support(N) | |
%Uses monte carlo model to input number of randomn varaibles to generate varying variables b and | |
%h so that they have a standard deviation | |
%The maximum deflection is then solved for and the mean and standard deviation of that is returned. | |
E=70e9; | |
q=50; | |
for i=1:N | |
b=normrnd(0.1,0.0001); | |
h=normrnd(0.01,0.00001); | |
I=(b*h^3)/12; | |
D= (q/(384*E*I))-(q/(96*E*I))+(q/(48*E*I)); | |
d(i)=D; | |
end | |
mean1=mean(d); | |
stand_dev=std(d); | |
end |