% OscillatorI6a
% This program plots the FWHM of the Lorentz(ian) function
% Where A_D^2 is the Eq. I.28 in the text
% Y = 4*A_D^2*\gamma^2/\omega_r^2
% X = (\omega-\omega)^2/\gamma^2
X = -10:.0001:10;
Y = 1./((X).^2+1);
close all   %this clears previous figures
plot(X,Y,'linewidth',3,'color','r')
set(gca,'fontname','Times New Roman','fontsize',20);
set(gca,'LineWidth',1.5,'TickLength',[0.03 0.025]);
xlabel('$(\omega-\rm\omega_r)/\gamma$','Interpreter','LaTeX','fontname','Times New Roman','fontsize',20)
ylabel ('4\it A\rm_D^2 \gamma^2/\omega_r^2','fontname','Times New Roman','fontsize',20)
xlim([-10 10]) %define limits for x axis
ylim([0 1.2]) %define limits for y axis
set(gcf, 'WindowStyle', 'normal');
set(gca, 'Unit', 'inches');
set(gca, 'TickLabelInterpreter','LaTeX',...
    'XTick',[-10:5:10],'XTickLabel',{'$-10$','$-5$','$0$','$5$','$10$'})

set(gcf, 'PaperPosition',1.9*[0 0 4 3],'PaperSize',1.9*[4 3]) %define the paper size and position
annotation('doublearrow',[.48 .555],[.48 .48])
text(-.5,0.45,'2\gamma','fontname','Times New Roman','fontsize',20)
saveas(gcf,'6a.pdf','pdf') %save file as 6a.pdf file