format compact
x0=350; % Center of peak
Height=1;
PG=0; % Percent Gaussian (=0 for pure Lorentzian, =100 for pure Gaussian)
x=10:.01:690;
span=max(x)-min(x);

width1=53.5;
y1=Height.*(GL(x,x0,width1,PG));
MeasuredArea=trapz(x,y1);
TrueArea=((100-PG)/100)*((pi/2).*width1*Height) + (PG/100)*(1.064467*width1*Height);
SpanToWidth=span/width1
PercentError=100*(MeasuredArea-TrueArea)/TrueArea

width2=10.6;
y2=Height.*(GL(x,x0,width2,PG));
MeasuredArea=trapz(x,y2);
TrueArea=((100-PG)/100)*((pi/2).*width2*Height) + (PG/100)*(1.064467*width2*Height);
SpanToWidth=span/width2
PercentError=100*(MeasuredArea-TrueArea)/TrueArea

width3=5;
y3=Height.*(GL(x,x0,width3,PG));
MeasuredArea=trapz(x,y3);
TrueArea=((100-PG)/100)*((pi/2).*width3*Height) + (PG/100)*(1.064467*width3*Height);
SpanToWidth=span/width3
PercentError=100*(MeasuredArea-TrueArea)/TrueArea

figure(1); 
clf
plot(x,y1,x,y2,x,y3);
disp(' ')