x = [0:0.1:50];

a = [108.3     216.7     124.6];
b = [0.01027   0.002723  0.004892];
c = [-634.2    -708.7    -651.1];
d = [-0.05952  -0.05213  -0.05583];

% SN07
SN07 = a(1)*exp(b(1)*x) + c(1)*exp(d(1)*x);

%SN11
SN11 = a(2)*exp(b(2)*x) + c(2)*exp(d(2)*x);

%SN18
SN18 = a(3)*exp(b(3)*x) + c(3)*exp(d(3)*x);

figure(1)
hold on
title('Difference Plot w/ Multiple Magnets', 'fontsize', 16);
plot(Distance, SN07_Diff, '+r', 'LineWidth', 0.5);
plot(Distance, SN11_Diff, '*g', 'LineWidth', 0.5);
plot(Distance, SN18_Diff, '^b', 'LineWidth', 0.5);
xlim([0 50]);
xlabel('Distance (mil)', 'fontsize', 14);
ylabel('Output (mV)', 'fontsize', 14);
legend('SN07', 'SN11', 'SN18', 'Location', 'Southeast');
set(gca, 'fontsize', 14);
hold off

figure(2)
hold on 
title('Fitted Plot', 'fontsize', 16);
xlabel('Distance (mil)', 'fontsize', 14);
ylabel('Output (mV)', 'fontsize', 14);
plot(x, SN07, 'r', 'LineWidth', 2);
plot(x, SN11, 'g', 'LineWidth', 2);
plot(x, SN18, 'b', 'LineWidth', 2);
legend('SN07', 'SN11', 'SN18', 'Location', 'Southeast');
set(gca, 'fontsize', 14);
hold off

figure(3)
hold on
plot(Distance, SN07_Diff, '+r', 'LineWidth', 0.5);
plot(Distance, SN11_Diff, '*g', 'LineWidth', 0.5);
plot(Distance, SN18_Diff, '^b', 'LineWidth', 0.5);
xlim([0 50]);
plot(x, SN07, 'r', 'LineWidth', 1);
plot(x, SN11, 'g', 'LineWidth', 1);
plot(x, SN18, 'b', 'LineWidth', 1);
hold off

