I am trying to run a Matlab script from a tcl file.
There are examples elsewhere of how to do this (eg Running Matlab Command From Tcl) :
exec {*}matlab -nodisplay -nosplash -nodesktop -r "ScriptTitle; quit"
However, as far as I can see, this works by opening up a new Matlab command window before executing the Matlab script.
However, I want to call the Matlab script as part of a loop, meaning it will be called many times by my tcl code. Each time matlab is called, a new matlab command window is opened. This takes a long time as the new command window has to open and load etc before it does anything. I want to know if there is a way to access an already open matlab command window from tcl? Or, alternatively, is there a more efficient way to run Matlab from tcl that would work well as part of a frequently repeated loop?