diff --git a/matlab/dynare_m.exe b/matlab/dynare_m.exe
index 698ef49df41bff69c6171d8e20f2a128f8b7deb8..cf81eeebeb8464b95950646685c516c5ca0b0689 100755
Binary files a/matlab/dynare_m.exe and b/matlab/dynare_m.exe differ
diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc
index e92d5a28e519e061337cf52d66d0ced511c6e8b8..ddd707183579789dc0d9c6f61e714979b36c1529 100644
--- a/preprocessor/ComputingTasks.cc
+++ b/preprocessor/ComputingTasks.cc
@@ -256,8 +256,8 @@ DynareSensitivityStatement::DynareSensitivityStatement(const OptionsList &option
void
DynareSensitivityStatement::writeOutput(ostream &output, const string &basename) const
{
- options_list.writeOutput(output);
- output << "dynare_sensitivity;" << endl;
+ options_list.writeOutput(output,"options_gsa");
+ output << "dynare_sensitivity(options_gsa);" << endl;
}
RplotStatement::RplotStatement(const TmpSymbolTable &tmp_symbol_table_arg,
diff --git a/preprocessor/Statement.cc b/preprocessor/Statement.cc
index 735f21c3f7177e015e66ff7f4da593c28fda6f51..2297e6142c6e99cdcbada543a48fa7f38a7708cf 100644
--- a/preprocessor/Statement.cc
+++ b/preprocessor/Statement.cc
@@ -73,6 +73,29 @@ OptionsList::writeOutput(ostream &output) const
it->second->writeOutput("options_."+it->first,output);
}
+void
+OptionsList::writeOutput(ostream &output, const string &option_group) const
+{
+ output << option_group << " = struct();" << endl;
+
+ for(num_options_type::const_iterator it = num_options.begin();
+ it != num_options.end(); it++)
+ output << option_group << "." << it->first << " = " << it->second << ";" << endl;
+
+ for(paired_num_options_type::const_iterator it = paired_num_options.begin();
+ it != paired_num_options.end(); it++)
+ output << option_group << "." << it->first << " = [" << it->second.first << "; "
+ << it->second.second << "];" << endl;
+
+ for(string_options_type::const_iterator it = string_options.begin();
+ it != string_options.end(); it++)
+ output << option_group << "." << it->first << " = '" << it->second << "';" << endl;
+
+ for(string_list_options_type::const_iterator it = string_list_options.begin();
+ it != string_list_options.end(); it++)
+ it->second->writeOutput(option_group+"."+it->first,output);
+}
+
void
OptionsList::clear()
{
diff --git a/preprocessor/include/Statement.hh b/preprocessor/include/Statement.hh
index 4379066dbc818e535c1a601a41217fb3901b265d..a05733c7d5cf13fa76e770b422ed2bfe05d3c1a4 100644
--- a/preprocessor/include/Statement.hh
+++ b/preprocessor/include/Statement.hh
@@ -78,6 +78,7 @@ public:
string_options_type string_options;
string_list_options_type string_list_options;
void writeOutput(ostream &output) const;
+ void writeOutput(ostream &output, const string &option_group) const;
void clear();
};