MATLAB Code For Closed Form Solution
MATLAB Code For Closed Form Solution
for t =0:0.02:15
x(i) =exp(-z*wn*t)*X*cos((wd*t)-alpha);
i =i+1;
end
t =0:0.02:15;
plot(t,x);
grid on;
MATLAB code for damped free vibration numerical solution
x=y(:,1); %displacement
plot(t,x);
grid on;
hold on;
X1=x0;
X2=xdot0/wn;
i=1;
for t=0:0.02:30
x(i)=X*cos((wn*t)-alpha);
i=i+1;
end
t=0:0.02:30;
plot(t,x);
hold on;
MATLAB code for undamped free vibration numerical solution
x=y(:,1); %displacement
plot(t,x);
grid on;
hold on;