Skip to content
Permalink
c625f3cd70
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
@akm13021
Latest commit fc517f1 Mar 29, 2017 History
1 contributor

Users who have contributed to this file

39 lines (30 sloc) 574 Bytes
%Program used to evaluate question 6
%Define constants and given values
N= [5,6,10]-1;
P=10;
E=76e9;
I=4e-9;
L=5;
%Initiate loop to solve for required numbers
i=1;
for n=N
derivX=L/n
pressE=P/(E*I);
ar=derivX^2*pressE^2-2;
m=diag(ones(1,n-1),-1)+diag(ar*ones(1,n))+ diag(ones(1,n-1),1)
%Find eigenvalues of above equation
eigVal=eig(m);
i;
minVal(i)= max(eigVal);
maxVal(i)=min(eigVal);
i=i+1
end
%Reverse values
minVal=(-1*minVal);
maxVal=(-1*maxVal);
%Print desired values
minVal'
maxVal'
N'
parts=N+1;
parts'