You are on page 1of 2

clear

clf
wn=12; % Natural frequency
zeta=[0.04;0.15;0.25;0.45;0.9;1.3;2.1]; % Damping ratio
x0=0; % Initial displacement
v0=60; % Initial velocity
t0=0; % Initial time
deltat=0.01; % Time step
tf=6; % Final time
t=[t0:deltat:tf];
for i=1:length(zeta),
wd=sqrt(1-zeta(i)^2)*wn; % Damped frequency
x=exp(-zeta(i)*wn*t).*(((zeta(i)*wn*x0+v0)/wd)*sin(wd*t)+x0*cos(wd*t));

plot(t,x)
hold on
end
title('Response sistem 1 DOF terhadap eksitasi mula')
xlabel('t[s]')
ylabel('x(t)')
grid

You might also like