mirror_pos = [9, 12, 15, 20, 25] / 100;  %(m)
length = [0.1750, 0.1946, 0.1794, 0.1578, 0.1578];  %3 Gcm
fit_mirror_pos = .09 : .001 : .25;
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 9 mm, ANL Undulator Runs 25-30, 3 Gcm Threshold');
xlabel('Mirror Plate Position (m)');
ylabel('Fringe Field Length (m)');
xlim([.05, .30]);
%ylim([2.75, 3.15]);
grid on;
zoom on;
hold off;
