Converts a MATLAB table variable into an Ensemble datastruct
0001 function data_st = ensemble_table2datastruct(data_t) 0002 % Converts a MATLAB table variable into an Ensemble datastruct 0003 0004 % 26Jan2015 Petr Janata 0005 0006 data_st = ensemble_init_data_struct; 0007 data_st.vars = data_t.Properties.VariableNames; 0008 nvars = length(data_st.vars); 0009 0010 data_st.data = cell(1,nvars); 0011 data_st.name = data_t.Properties.Description; 0012 0013 for ivar = 1:nvars 0014 data_st.data{ivar} = data_t{:,ivar}; 0015 end 0016 0017 end