Skip to content
Snippets Groups Projects
Commit 755b5725 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Simplify MATLAB output of symbol lists.

parent 828f9d73
No related branches found
No related tags found
No related merge requests found
/*
* Copyright (C) 2003-2010 Dynare Team
* Copyright (C) 2003-2014 Dynare Team
*
* This file is part of Dynare.
*
......@@ -28,13 +28,15 @@ SymbolList::addSymbol(const string &symbol)
void
SymbolList::writeOutput(const string &varname, ostream &output) const
{
output << varname << "=[];" << endl;
output << varname << " = char(";
for (vector<string>::const_iterator it = symbols.begin();
it != symbols.end(); it++)
if (it == symbols.begin())
output << varname << " = '" << *it << "';" << endl;
else
output << varname << " = char(" << varname << ", '" << *it << "');" << endl;
it != symbols.end(); ++it)
{
if (it != symbols.begin())
output << ",";
output << "'" << *it << "'";
}
output << ");" << endl;
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment