aouiche
Mechanical
- May 14, 2012
- 23
can some one help me to extend the matlab script in below (which give the solution of dynamic system (2x2)) to resolve system (33x33)
mt=[0 0 30 0;0,0,0,50;30,0,0,0;0,50,0,80];
kt=[-40,0,0,0;0,-50,0,0;0,0,35000,-25000;0,0,-25000, 4000];
Z=inv(mt)*kt;
[V,D]=eig(Z);
disp('Eigenvalues')
DS=[D(1,1),D(2,2),D(3,3),D(4,4)]
disp('Eigenvectors')
V
x0=[0;0;0.01;0];
S=inv(V)*x0;
tk=linspace(0,2,101);
for k=1:101
t=tk(k);
for i=3:4
x(k,i-2)=0;
for j=1:4
x(k,i-2)=x(k,i-2)+(real(S(j))*real(V(i,j))
-imag(S(j))*imag(V(i,j)))*cos(imag(D(j,j))*t);
x(k,i-2)=x(k,i-2)+(imag(S(j))*real(V(i,j))-imag(S(j))*imag(V(i,j)))
*sin(imag(V(i,j))*t);
x(k,i-2)=x(k,i-2)*exp(-real(D(j,j))*t);
end
end
end
plot(tk,x,1),'-',tk,x,2),':')
title('Free Vibration response of damped system')
xlabel('t (sec)')
Thanks