%% Create Legend with LaTeX Markup
% Create a plot, and add a legend with LaTeX markup by calling the legend function and setting the Interpreter property to 'latex'. Surround the markup with dollar signs ($).

x = 0:0.1:10;
y = sin(x);
dy = cos(x);
plot(x,y,x,dy);
legend('$sin(x)$','$\frac{d}{dx}sin(x)$','Interpreter','latex');

% Copyright 2020 The MathWorks, Inc.