Skip to content
Permalink
eb47264c20
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
23 lines (16 sloc) 417 Bytes
%This script solves the ODE Equation for the
%Spring Mass System given in the HW
%Values of System
stiff = [10,20,20,10];
mass= [1;2;4;];
%ODE Equations
f1=[-1*(stiff(1)+stiff(2)), stiff(2), 0];
f2=[stiff(2), -1*(stiff(2)+stiff(3)), stiff(3)];
f3=[0,stiff(3), -1*(stiff(3)+stiff(4))];
K= [f1;f2;f3];
K= -1*K;
M= diag(mass);
K_tilde= (M^(-1/2))*(K)*(M^(-1/2));
%Final lambda and omega
e=eig(K_tilde)
w= sqrt(e)