Skip to content
Permalink
2f9ce3f0af
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
26 lines (25 sloc) 619 Bytes
N= [5,6,10]-1; %Define N
%Define given terms
P=10; %Define Axial Load
E=76e9; %define modulus of elasticity
I=4e-9; %Define moment of inertia
L=5; %Define length
i=1; %define first iteration
%For loop for maximum and minimum eigenvalues
for n=N
Dx=L/n
p=P/(E*I);
a=Dx^2*p^2-2;
m=diag(ones(1,n-1),-1)+diag(a*ones(1,n))+ diag(ones(1,n-1),1)
e=eig(m);
i;
max_lambda(i)= max(e); %iteration results of max eigenvalue
min_lambda(i)=min(e); %iteration results of minimum eigenvalue
i=i+1
end
%following codes display the values needed
max_lambda'
min_lambda'
N'
nodes=N+1;
nodes'