gap = [10.5, 15.0, 25.0, 35.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0];
%length = [0.2067, 0.2073, 0.2205, 0.2317, 0.2431, 0.2485, 0.2567, 0.2475, 0.2583, 0.2569];  %3 Gcm
length = [0.1823, 0.1753, 0.1883, 0.1987, 0.2107, 0.2201, 0.2161, 0.2165, 0.2273, 0.2293];  %5 Gcm
fit_gap = 10.5 : .1 : 100;
p2 = polyfit(gap, length, 2);
fit_length = polyval(p2, fit_gap);
figure;
hold on;
%plot(gap, length, '-b*', 'linewidth', 2, 'markersize', 8);
plot(gap, length, 'b*', 'markersize', 8);
plot(fit_gap, fit_length, '-b', 'linewidth', 2);
title('Fringe Field Length vs Gap, ANL Undulator Runs 36-45, 5 Gcm Threshold');
xlabel('Gap (mm)');
ylabel('Fringe Field Length (m)');
xlim([0, 110]);
%ylim([2.75, 3.15]);
grid on;
zoom on;
hold off;
