implement forecast with Matlab