MATLAB/Octave code which would take failure stresses/strains as input and output the failure envelopes for Haigh’s, Rankine’s and St.Venant’s theory.