From 82e4905914b29a659a56d5f0997b49621fa2b00d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Tue, 14 May 2013 14:41:34 +0200
Subject: [PATCH] Create options_.varobs as a cell array.

---
 preprocessor/SymbolTable.cc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/preprocessor/SymbolTable.cc b/preprocessor/SymbolTable.cc
index b90b1ce59d..4141e94108 100644
--- a/preprocessor/SymbolTable.cc
+++ b/preprocessor/SymbolTable.cc
@@ -253,14 +253,14 @@ SymbolTable::writeOutput(ostream &output) const throw (NotYetFrozenException)
 
   if (observedVariablesNbr() > 0)
     {
-      output << "options_.varobs = [];" << endl;
+      int ic = 1;
+      output << "options_.varobs = cell(1);" << endl;
       for (vector<int>::const_iterator it = varobs.begin();
            it != varobs.end(); it++)
-        if (it == varobs.begin())
-          output << "options_.varobs = '" << getName(*it) << "';" << endl;
-        else
-          output << "options_.varobs = char(options_.varobs, '" << getName(*it) << "');" << endl;
-
+	{
+	  output << "options_.varobs(" << ic << ")  = {'" << getName(*it) << "'};" << endl;
+	  ic++;
+	}
       output << "options_.varobs_id = [ ";
       for (vector<int>::const_iterator it = varobs.begin();
            it != varobs.end(); it++)
-- 
GitLab