Permalink
Cannot retrieve contributors at this time
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?
Linear_algebra/Pole_Vaulting.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26 lines (25 sloc)
619 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |