From b70bc9433f37f29a6feb78e707c1104fd048c0eb Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Thu, 6 Oct 2016 14:21:25 +0200 Subject: [PATCH] pm3: restore Matlab compatibility by loading file into a variable In R2016b the variables loaded in the function need to be known in advance --- matlab/pm3.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matlab/pm3.m b/matlab/pm3.m index 52ea8ff80..3c6857c62 100644 --- a/matlab/pm3.m +++ b/matlab/pm3.m @@ -87,7 +87,8 @@ filter_step_ahead_indicator=0; filter_covar_indicator=0; for file = 1:ifil - load([DirectoryName '/' M_.fname var_type int2str(file)]); + loaded_file=load([DirectoryName '/' M_.fname var_type int2str(file)]); + stock=loaded_file.stock; if strcmp(var_type,'_filter_step_ahead') if file==1 %on first run, initialize variable for storing filter_step_ahead stock1_filter_step_ahead=NaN(n1,n2,B,length(options_.filter_step_ahead));