% Script to plot phase 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)
    T(i,:) = phase(beta,xi(i))*(180/pi); % in degrees
end
plot(beta,T);
xlabel('Frequency Ratio');
ylabel('Phase Angle (degrees)');
ylim([0 180]);
set(gca,'ytick',[0 45 90 135 180]);
grid on;
legend('Damping: 0%','Damping: 10%','Damping: 20%','Damping: 50%',...
    'Damping: 100%','Location','SE');