function magphase(f,H)
% magphase(f,H) - plot the magnitude and phase of a transfer function
%   f - vector of frequencies
%   H - complex transfer function
subplot(211)
loglog(f,abs(H));grid
ylabel('Log Magnitude');
title('Magnitude and Phase Plots');
subplot(212)
semilogx(f, angle(H)*180/pi); grid
ylabel('Angle (deg)'); xlabel('Frequency');
