Wednesday, December 8, 2010

Octave Interpreter issues in Windows

On Windows, there is an issue when passing Swig types into Octave functions. Since Octave works with matrices, converting tc_matrix to Octave matrix is most important. The "fromTC" function does the job in Linux, but in windows, the OctaveInterpreter does a regex-replace of fromTC and replaces it with a double-for-loop that converts the tc_matrix into Octave's matrix.

Also, setInterpreter method has been added to the ConsoleWindow class. Here is how to use it (taken from SimpleDesigner.cpp):

ConsoleWindow * console = mainWindow.console();
OctaveInterpreterThread * octaveInterpreter = new OctaveInterpreterThread("tinkercell.oct", "libtcoct", &mainWindow);
octaveInterpreter->initialize();
console->setInterpreter(octaveInterpreter);

No comments: