|
|
Input ports can be added and are automatically loaded into variables in matlab which can be referenced by the port name.
Similarly output can be made by adding output ports to the actor. The output values are taken from variables with the same names as the output ports.
NOTE: windows is a bit more tempermental than unix system. the EXE file must be directly pointed to by the mlCmd property. E.g c:\\matlab7\\bin\\win32\\matlab.exe
Also, windows command line matlab doesn't use the standard in and out, instead it uses it's own command window, which makes it impossible to read and write to the matlab process using the process input and output streams. So instead the actor writes the data to a file and read in the outputs from the file. The file is created with a random integer at the end of the file name to (in theory) allow multiple matlab actors to run at the same time. The file is deleted once it's been read.
TODO: currently this actor only works with standard single value and array results. support for all forms of matlab output needs to be implemented
NOTE: now with java 1.4 complience!! using the ProcessBuilder in java 1.5 makes things a lot easier but since we need to compile under 1.4 here it is.
Changelog 27/04/06: * check for existance of executable under windows * kill matlab process when stop() is called * check to make sure variable for output port name exists if it doesn't, then set it to 0 * changed expression to PortParameter * changed error handling: sends error message to output port for some things
Author(s): Tristan King, Nandita Mangal
Version:$Id$
|
|