function S2=sig2(Sxx,Syy,Sxy)
% function S1=sig2(Sxx,Syy,Sxy)
% Calculates the most tensile 2-D principal stress magnitude
% Input parameters
% Sxx = sigma xx
% Syy = sigma yy
% Sxy = sigma xy
% Output parameter
% S1 = most tensile principal stress
% Example 
% S1=sig2(4,-4,3)

S2 = (Sxx+Syy)/2 - sqrt( ((Sxx-Syy)/2).^2 + Sxy.^2);
