Fix bug introduced in bfd93f4ac0ff1e with correlations in estim_params

For correlations, there is one extra columns (since there are two symbol
indices). MATLAB automatically adds the missing column, while Octave is
stricter when verifying dimensions.

By the way, add a missing comma.

(manually cherry-picked from 1c33af4844557f9a5ce95a1ab6f3e293006c0811)
parent 428f4ceb
Pipeline #241 passed with stages
in 300 minutes and 58 seconds
......@@ -813,8 +813,8 @@ EstimatedParamsStatement::writeOutput(ostream &output, const string &basename, b
{
output << "estim_params_.var_exo = zeros(0, 10);" << endl
<< "estim_params_.var_endo = zeros(0, 10);" << endl
<< "estim_params_.corrx = zeros(0, 10);" << endl
<< "estim_params_.corrn = zeros(0, 10);" << endl
<< "estim_params_.corrx = zeros(0, 11);" << endl
<< "estim_params_.corrn = zeros(0, 11);" << endl
<< "estim_params_.param_vals = zeros(0, 10);" << endl;
for (vector<EstimationParams>::const_iterator it = estim_params_list.begin(); it != estim_params_list.end(); it++)
......@@ -840,7 +840,7 @@ EstimatedParamsStatement::writeOutput(ostream &output, const string &basename, b
output << "estim_params_.corrx = [estim_params_.corrx; ";
else if (symb_type == eEndogenous)
output << "estim_params_.corrn = [estim_params_.corrn; ";
output << symb_id << " " << symbol_table.getTypeSpecificID(it->name2)+1;
output << symb_id << ", " << symbol_table.getTypeSpecificID(it->name2)+1;
break;
}
output << ", ";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment