%% Plot Secant Function
% Plot the secant over the domain -\pi/2<x<\pi/2 and \pi/2<x<3\pi/2 .

x1 = -pi/2+0.01:0.01:pi/2-0.01; 
x2 = pi/2+0.01:0.01:(3*pi/2)-0.01; 
plot(x1,sec(x1),x2,sec(x2)), grid on

% Copyright 2015 The MathWorks, Inc.