pm3: restore Matlab compatibility by loading file into a variable

In R2016b the variables loaded in the function need to be known in advance
time-shift
Johannes Pfeifer 2016-10-06 14:21:25 +02:00
parent 209f1b4a7c
commit b70bc9433f
1 changed files with 2 additions and 1 deletions

View File

@ -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));