%% Add a Legend
% Create two sets of x- and y-coordinates and display them in a log-log plot. Display a legend in the upper left corner of the plot by calling the legend function and specifying the location as 'northwest'.

x = logspace(-1,2,10000);
y1 = 5 + 3*sin(x/4);
y2 = 5 - 3*sin(x/4);
loglog(x,y1,x,y2,'--')
legend('Signal 1','Signal 2','Location','northwest')

% Copyright 2019 The MathWorks, Inc.