From 06f492655381e8cf4212ed5d06cc9fa329e0bbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Scylla=29?= Date: Thu, 28 Aug 2014 12:31:51 +0200 Subject: [PATCH] Do not consider variables that are not column vectors. --- matlab/load_m_file_data.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/matlab/load_m_file_data.m b/matlab/load_m_file_data.m index 637301c16..05aa753c0 100644 --- a/matlab/load_m_file_data.m +++ b/matlab/load_m_file_data.m @@ -97,14 +97,20 @@ if isempty(varlist0) continue end if list_of_variables(current_variable_index).global || list_of_variables(current_variable_index).persistent + % A variable cannot be a global or persistent variable. continue end if list_of_variables(current_variable_index).complex || ~strcmp(list_of_variables(current_variable_index).class,'double') + % A variable cannot be complex. + continue + end + if list_of_variables(current_variable_index).size(2)>1 + % A variable must be passed as a column vector. continue end try eval(['data = [data, ' list_of_variables(current_variable_index).name '];']) - eval(['varlist = {varlist{:}, ''' list_of_variables(current_variable_index).name '''};']) + eval(['varlist = {varlist{:}, ''' list_of_variables(current_variable_index).name '''};']) catch error(['load_m_file:: All the vectors (variables) in ' inputname(1) ' must have the same number of rows (observations)!']) end