hess smith panel method matlab code