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 central_diff6P(P,q)
b=0.1; %width of beam
E=70E9; %Young's modulus
h=0.01;%height of beam
I=(b*(h^3))/12; %Second MOI
n=6; %number of segments
x=1/n; %segment equivalent
z=((x.^4)*q)/(E*I); %differentiation used to solve for displacement
Off_Diag=-4-(((P*(1/(n^2)))/(E*I))); %Off Diagonal value
Diag=6+((P*(2*(1/(n^2))))/(E*I)); %Diagonal value
ODV = ones((n-2),1)*Off_Diag; %Off Diagonal vector
DV = ones(n-1,1)*Diag; %Diagonal vector
OOD = ones((n-3),1); %Off off diagonal vector
%Generate Matrix X
X=diag(ODV,-1)+ diag(DV)+diag(ODV,1)+diag(OOD,2)+diag(OOD,-2);
X(1,1)= 5+((P*(2*(1/(n^2))))/(E*I));
X((n-1),(n-1))=5+((P*(2*(1/(n^2))))/(E*I));