%  Problem 2 - Exam II - Spring 2012
% 
% Sm =    360.0 MPa
% Se =    180.0 MPa
% b =  -0.1003 
% a =   720.00 
% Stress =    226.8 MPa 
% 

%  This script interpolates the S-N curve at 100,000 cycles

Sm = 360;           %MPa
Se = 180;           %MPa
b = -log10(Sm / Se) / 3;
loga = log10(Sm) - 3*b;
a = 10^loga;

Stress = a * 100000 ^ b;

fprintf('Sm = %8.1f MPa\n', Sm);
fprintf('Se = %8.1f MPa\n', Se);
fprintf('b = %8.4f \n', b);
fprintf('a = %8.2f \n', a);
fprintf('Stress = %8.1f MPa \n', Stress);
