diff --git a/matlab/get_existing_subsamples_indx.m b/matlab/get_existing_subsamples_indx.m index a8f30ed41..3f6e5b42b 100644 --- a/matlab/get_existing_subsamples_indx.m +++ b/matlab/get_existing_subsamples_indx.m @@ -38,9 +38,9 @@ global estimation_info if isempty(name2) % parameter or std() statement subsamples_indx = find(strcmp(name1, estimation_info.subsamples_index) == 1); else % corr statement - subsamples_indx = find(strcmp([name1 '_' name2], estimation_info.subsamples_index) == 1); + subsamples_indx = find(strcmp([name1 ':' name2], estimation_info.subsamples_index) == 1); if isempty(subsamples_indx) - subsamples_indx = find(strcmp([name2 '_' name1], estimation_info.subsamples_index) == 1); + subsamples_indx = find(strcmp([name2 ':' name1], estimation_info.subsamples_index) == 1); end end diff --git a/matlab/get_new_or_existing_ei_index.m b/matlab/get_new_or_existing_ei_index.m index 7f1c379c0..39bec99a3 100644 --- a/matlab/get_new_or_existing_ei_index.m +++ b/matlab/get_new_or_existing_ei_index.m @@ -44,9 +44,9 @@ end if isempty(name2) % parameter or std() statement indx = eval(['find(strcmp(name1, estimation_info.' substructure_name ') == 1)']); else % corr statement - indx = eval(['find(strcmp([''' name1 '_' name2 '''], estimation_info.' substructure_name ') == 1)']); + indx = eval(['find(strcmp([''' name1 ':' name2 '''], estimation_info.' substructure_name ') == 1)']); if isempty(indx) - indx = eval(['find(strcmp([''' name2 '_' name1 '''], estimation_info.' substructure_name ') == 1)']); + indx = eval(['find(strcmp([''' name2 ':' name1 '''], estimation_info.' substructure_name ') == 1)']); end end diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc index 3660946e4..34cde5366 100644 --- a/preprocessor/ComputingTasks.cc +++ b/preprocessor/ComputingTasks.cc @@ -1651,7 +1651,7 @@ SubsamplesStatement::writeOutput(ostream &output, const string &basename) const << name1 << "','" << name2 << "');" << endl << "estimation_info.subsamples_index(subsamples_indx) = {'" << name1; if (!name2.empty()) - output << "_" << name2; + output << ":" << name2; output << "'};" << endl << "estimation_info.subsamples(subsamples_indx).range = {};" << endl; @@ -1689,7 +1689,7 @@ SubsamplesEqualStatement::writeOutput(ostream &output, const string &basename) c << to_name1 << "','" << to_name2 << "');" << endl << "estimation_info.subsamples_index(subsamples_to_indx) = {'" << to_name1; if (!to_name2.empty()) - output << "_" << to_name2; + output << ":" << to_name2; output << "'};" << endl << "subsamples_from_indx = get_existing_subsamples_indx('" << from_name1 << "','" << from_name2 << "');" << endl @@ -1885,13 +1885,12 @@ CorrPriorStatement::writeOutput(ostream &output, const string &basename) const output << "eifind = get_new_or_existing_ei_index('" << lhs_field << "_corr_prior_index', '" << name << "', '" << name1 << "');" << endl << "estimation_info." << lhs_field << "_corr_prior_index(eifind) = {'" - << name << "_" << name1 << "'};" << endl; + << name << ":" << name1 << "'};" << endl; lhs_field = "estimation_info." + lhs_field + "_corr(eifind)"; writePriorOutput(output, lhs_field); +} - output << lhs_field << ".name1 = '" << name << "';" << endl - << lhs_field << ".name2 = '" << name1 << "';" << endl; } BasicOptionsStatement::~BasicOptionsStatement() @@ -2022,11 +2021,8 @@ CorrOptionsStatement::writeOutput(ostream &output, const string &basename) const output << "eifind = get_new_or_existing_ei_index('" << lhs_field << "_corr_options_index', '" << name << "', '" << name1 << "');" << endl << "estimation_info." << lhs_field << "_corr_options_index(eifind) = {'" - << name << "_" << name1 << "'};" << endl; + << name << ":" << name1 << "'};" << endl; lhs_field = "estimation_info." + lhs_field + "_corr(eifind)"; writeOptionsOutput(output, lhs_field, name1); - - output << lhs_field << ".name1 = '" << name << "';" << endl - << lhs_field << ".name2 = '" << name1 << "';" << endl; }