function VTB2_3(z,rmin,rmax) %VTB2_3 Steady state magnitude and phase of a single degree of freedom % damped system. % VTB2_3(zeta,rmin,rmax) plots the response of a single degree of % freedom system with damping ratio zeta between the frequency % ratios rmin and rmax. r=rmin:(rmax-rmin)/1000:rmax; A0=(1)./sqrt((1-r.^2).^2+(2*z*r).^2);%(2.30) phi=atan2(2*z*r,1-r.^2);%(2.30) semilogy(r,A0) xlabel('Frequency Ratio') ylabel('Normalized Amplitude') title('Normalized Amplitude versus Frequency Ratio') text(0,0,'Press Return To Continue','sc') pause plot(r,phi) xlabel('Frequency Ratio') ylabel('Phase') title('Phase versus Frequency Ratio') text(0,0,'Press Return To Continue','sc')