Commit a07b0ae6 authored by Jacob Smith's avatar Jacob Smith
Browse files

Bug Fix, when using parameter uncertainty on multiple regimes

parent 65e0a4c4
......@@ -115,6 +115,7 @@ mexFunction(int nlhs, mxArray *plhs[],
for (s = 0; s < nstates; s++)
{
printf("Constructing percentiles for forecast - regime %d\n", s);
if (options->simulation_file) rewind(options->simulation_file);
if (histogram = forecast_percentile_regime(options->shocks, options->simulation_file, options->thin, s, T, options->horizon, model, type))
{
for (k = 0; k < options->num_percentiles; k++)
......
......@@ -114,6 +114,7 @@ mexFunction(int nlhs, mxArray *plhs[],
for (s = 0; s < nstates; s++)
{
printf("Constructing percentiles for impulse responses - regime %d\n", s);
if (options->simulation_file) rewind(options->simulation_file);
if (histogram = impulse_response_percentile_regime(options->simulation_file, options->thin, s, options->horizon, model, type))
{
for (k = 0; k < options->num_percentiles; k++)
......
......@@ -130,6 +130,7 @@ mexFunction(int nlhs, mxArray *plhs[],
}
else
{
if (options->simulation_file) rewind(options->simulation_file);
if (histogram = variance_decomposition_percentiles_regime(options->simulation_file, options->thin, s, options->horizon, model, type))
{
tvd = CreateMatrix(options->horizon, nvars*nvars);
......
Supports Markdown
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