Skip to content
Snippets Groups Projects
Commit 8e73289f authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Stéphane Adjemian
Browse files

read_variables.m: consistently account for variables being stored as cell array

parent 0a80ca40
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ switch (extension)
case { '.xls', '.xlsx' }
[freq,init,data,varlist] = load_xls_file_data(fullname,xls_sheet,xls_range);
for dyn_i_01=1:var_size_01
iv = strmatch(strtrim(var_names_01(dyn_i_01,:)),varlist,'exact');
iv = strmatch(strtrim(var_names_01{dyn_i_01}),varlist,'exact');
if ~isempty(iv)
dyn_tmp_01 = [data(:,iv)]';
if length(dyn_tmp_01) > dyn_size_01 && dyn_size_01 > 0
......@@ -101,7 +101,7 @@ switch (extension)
dyn_data_01(:,dyn_i_01) = dyn_tmp_01;
else
cd(old_pwd)
error([strtrim(var_names_01(dyn_i_01,:)) ' not found in ' fullname])
error([strtrim(var_names_01{dyn_i_01}) ' not found in ' fullname])
end
end
case '.csv'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment