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
seg6 = [ 5 -4 1 0 0
-4 6 -4 1 0
1 -4 6 -4 1
0 1 -4 6 -4
0 0 1 -4 5];
seg10= [5 -4 1 0 0 0 0 0 0
-4 6 -4 1 0 0 0 0 0
1 -4 6 -4 1 0 0 0 0
0 1 -4 6 -4 1 0 0 0
0 0 1 -4 6 -4 1 0 0
0 0 0 1 -4 6 -4 1 0
0 0 0 0 1 -4 6 -4 1
0 0 0 0 0 1 -4 6 -4
0 0 0 0 0 0 1 -4 5];
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];
b=0.1;
h=0.01;
I=b*(h^3)/12;
E=70e9;
q=[1,10,20,30,50];
n=[6,10,20];
for i=1:5
for N = 1:3
b=(((1/n(N))^4)*q(i))/(E*I);
if n(N)==6
B=b*ones((n(N)-1),1);
W=seg6\B;
dx(i,N)=max(W);
elseif n(N)==10
B=b*ones((n(N)-1),1);
W=seg10\B;
dx(i,N)=max(W);
elseif n(N)==20
B=b*ones((n(N)-1),1);
W=seg20\B;
dx(i,N)=max(W);
end
end
end
plot(q,dx)
xlabel('q')
ylabel('dx')
title('Load vs Max Deflection')
legend('6 segments','10 segments','20 segments')