Matlab program 1 (This does not involve stress consideration)Click here
Matlab program 2 (This involves a stress field consideration)Click here
ANSYS sub-routineClick here