From aef46cf78e1711e81ca465f6542955e7a3c9acc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Ithaque=29?= Date: Thu, 1 Apr 2010 15:27:42 +0200 Subject: [PATCH] Fixed bug. The declared paths for the constrained variables have to be centered (Users declare constrained variables in *levels*, imcforecasts centers the paths and adds the trend in the end). (cherry picked from commit 4cb664a5089bc25bba7dfe63c2f0bdb743c4d5a7) --- matlab/imcforecast.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matlab/imcforecast.m b/matlab/imcforecast.m index 5d91ae99b..e71d29716 100644 --- a/matlab/imcforecast.m +++ b/matlab/imcforecast.m @@ -180,6 +180,8 @@ else cL = size(constrained_paths,2); end +constrained_paths = bsxfun(@minus,constrained_paths,trend(idx,1:cL)); + randn('state',0); for b=1:options_cond_fcst.replic