added reading parameters from matlab