shestakov code (NSE 1990) translated into matlab