mirror_pos = [9, 12, 15, 20, 25, 34] / 100;  %(m)
length = [0.2212, 0.1998, 0.2046, 0.1884, 0.1748, 0.3408];  %3 Gcm
fit_mirror_pos = .09 : .001 : .40;
p2 = polyfit(mirror_pos, length, 2);
fit_length = polyval(p2, fit_mirror_pos);
figure;
hold on;
plot(mirror_pos, length, 'b*', 'markersize', 8);
plot(fit_mirror_pos, fit_length, '-b', 'linewidth', 2);
title('Fringe Field Length vs Mirror Position, Gap 45 mm, ANL Undulator Runs 31-36, 3 Gcm Threshold');
xlabel('Mirror Plate Position (m)');
ylabel('Fringe Field Length (m)');
xlim([.05, .40]);
%ylim([2.75, 3.15]);
grid on;
zoom on;
hold off;
