Ferrazza model - fortran to matlab