% Script to plot DAF against Beta for different damping ratios
% Written by Dr Colin Caprani - www.colincaprani.com

xi = [0.0001,0.1,0.2,0.5,1.0];
beta = 0.01:0.01:3;
for i = 1:length(xi)
    D(i,:) = DAF(beta,xi(i));
end
plot(beta,D);
xlabel('Frequency Ratio');
ylabel('Dynamic Amplification');
ylim([0 6]); % set y-axis limits since DAF at xi = 0 is enormous
legend('Damping: 0%','Damping: 10%','Damping: 20%','Damping: 50%',...
    'Damping: 100%');