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
function B = central_diff20(q)
%This function of q uses central difference approximation to set up a system of
%equations while using numerical differentiation to determine the value of the end points.
x=1/20; %splits up beam into twenty
b=0.1; %width of beam
E=70E9; %Young's modulus
h=0.01;%height of beam
I=(b*(h^3))/12; %Second MOI
z=((x.^4)*q)/(E*I); %differentiation used to solve for displacement
Seg20= [5,-4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
-4,6,-4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
1,-4,6,-4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,-4,6,-4,1,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,1,-4,6,-4,1,0,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,1,-4,6,-4,1,0,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,1,-4,6,-4,1,0,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,1,-4,6,-4,1,0,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,1,-4,6,-4,1,0,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,1,-4,6,-4,1,0,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,1,-4,6,-4,1,0,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,1,-4,6,-4,1,0,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,1,-4,6,-4,1,0,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,1,-4,6,-4,1,0,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,1,-4,6,-4,1,0,0;
0,0,0,0,0,0,0,0,0,0,0,0,0,1,-4,6,-4,1,0;
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-4,6,-4,1;
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-4,6,-4;
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-4,5];
Y=[z;z;z;z;z;z;z;z;z;z;z;z;z;z;z;z;z;z;z];
B=Seg20\Y;