Fix bug in pm3 for filtered variables that led to crashes.

Manual merge of Johannes PR #737.

-> Check for size of array failed with singleton dimension.
time-shift
Stéphane Adjemian (Hermes) 2015-06-01 18:22:54 +02:00
parent 1614805c17
commit 3602a0b1a8
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ k = 0;
filter_step_ahead_indicator=0;
for file = 1:ifil
load([DirectoryName '/' M_.fname var_type int2str(file)]);
if size(size(stock),2) == 4
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));
end