Skip to content

4.0.0

Compare
Choose a tag to compare
@jakaplan jakaplan released this 21 Nov 16:26

A major overhaul of matlabcontrol, it includes the following:

  • Dramatically improved reliability, with a complete rewrite of the MATLAB interaction logic
  • Transparent unification of control from inside MATLAB and outside MATLAB
  • Unconditionally thread-safe
  • Highly configurable MATLAB settings, including running hidden
  • Ability to reconnect to a previously controlled session
  • Can disconnect from a MATLAB session without exiting MATLAB
  • Detailed documentation which includes how types are converted between MATLAB and Java
  • Numeric array conversion between MATLAB and Java arrays
  • Non-interference with any other Remote Method Invocation uses in the application (when running outside MATLAB)
  • Transfer non-JRE classes between MATLAB and the Java application (when running outside MATLAB)
  • Fixes bugs preventing a Java application from terminating properly (when running outside MATLAB)

For those coming from v3, here are some important changes to note:

  • There is no longer a distinction between local and remote control class-wise. There are times when the phrases running inside MATLAB and running outside MATLAB are used. Running inside MATLAB refers to what was previously called local control, while running outside MATLAB refers to what was previous called remote control. In all cases, MatlabProxy is the class which communicates with MATLAB, although in this version there are a number of classes which can wrap around a proxy.
  • Many of MatlabProxy's core methods have changed their signatures. getVariable(...), setVariable(...), eval(...), and exit() remain the same. feval(...) and returningFeval(...) now take in their function arguments using varargs which makes it easy to call a MATLAB function with any number of arguments. returningEval(...) and returningFeval(...) now return Object[] with the length of the array equal to the number of arguments to be returned. The overloaded version of returningFeval(...) that did not require specifying the number of return arguments has been removed. Additionally, setEchoEval(...) has been removed.
  • A MatlabProxyFactory can still have the location of MATLAB and the proxy creation timeout specified but it is instead done using an instance of MatlabProxyFactoryOptions. The default timeout for getting a proxy is now 180 seconds which is increased from the previous 60 second timeout.
  • When running inside MATLAB, a MatlabProxy may not be called from the Event Dispatch Thread (EDT) used by AWT and Swing. While previous versions allowed this, it often lead to MATLAB locking up. A proxy may be used indirectly on the EDT by using a CallbackMatlabProxy.
  • MatlabConnectionListener no longer exists. When requesting a proxy via the factory's requestProxy(...) method you provide a callback. Each proxy instance can have DisconnectionListeners added.
  • Requesting a proxy via requestProxy(...) now returns a Request object instead of the proxy's identifier. The identifier can be retrieved from the request. A proxy's identifier is no longer a String, it is now an Identifier.
  • There is nothing like the deprecated RemoteMatlabProxyController.