anchor.diff:  While there aren't many, there are at least a few companies that offer MATLAB interfaces for some of their products. These libraries are typically only useful to customers who bought a particular product.
   ////
   
  +// Add section on "Comparison" and how we used a typical low-level feedback loop as example?
  +
   == Distributed Systems
   
  +// Add some info here related to distributed systems and interface evolution / common pain points? Using several MATLAB instances that work together wth C++ processes?
   
   === Lightweight Communication and Marshalling (LCM)
   
  -https://lcm-proj.github.io/tut_matlab.html[LCM] is a message passing framework that was developed at http://www.mit.edu/[MIT] in 2006 for their entry to DARPA's Urban Challenge. In the robotics community it became a popular alternative to ROS and was as far as we know the first messaging framework that supported MATLAB as a core language. Its MATLAB bindings were implemented in Java and did not contain any actual MATLAB code.
  -
  -The interface exposed two Java classes as well as generated message types.
  -
  -* The https://github.com/lcm-proj/lcm/blob/master/lcm-java/lcm/lcm/LCM.java[LCM] class provided a way to publish messages and subscribe to channels
  -* The https://github.com/lcm-proj/lcm/blob/master/lcm-java/lcm/lcm/MessageAggregator.java[MessageAggregator] class received messages from a background thread and queued them for MATLAB
  -* The generated Java messages handled the binary encoding and exposed fields that MATLAB can access
  -
  -By receiving messages on a background thread and by moving the encoding and decoding steps to the Java language, the main thread was able to spend most of its time on actually working with the data. Publishing a message could look as follows.
  +https://lcm-proj.github.io/tut_matlab.html[LCM] is a message passing framework that was developed at http://www.mit.edu/[MIT] in 2006 for their entry to DARPA's Urban Challenge. In the robotics community it became a popular alternative to ROS and was as far as we know the first messaging framework that supported MATLAB as a core language. We found its implementation to be comparatively simple and would recommend it as a starting point when developing new interfaces.
  +
  +The snippet below shows how the MATLAB code for sending a command message could look like. The code creates a struct-like _message_, sets some values, and publishes it on a selected channel. The encoding and transmission steps are hidden.
   
   [source,matlab]
   ----
  
positive.code: end
  ----
  
  Overall, we think that this is well thought out API and a great example of a minimum viable interface that works well in practice.
  
  One minor issue we found was that the decoding step _fbk = types.feedback(msg.data)_ forces two unnecessary translations due to _msg.data_ being a _byte[]_, which automatically gets converted to and from _int8_. This could result in a noticeable performance hit when receiving larger messages (e.g. images) and could be avoided by adding an overload that accepts a non-primitive type that does not get translated, e.g., _fbk = types.feedback(msg)_. The Java classes also didn't implement _Serializable_, which could become a problem when trying to save the workspace. 
  
  === Robot Operating System (ROS)
  
  
negative.code: lc = lcm.lcm.LCM.getSingleton();
  
  % Fill message
  cmd = types.command();
  cmd.position = [1 2 3];
  cmd.velocity = [1 2 3];
  
  % Publish
  lc.publish('COMMAND_CHANNEL', cmd);
  ----
  
  Receiving messages is done by subscribing an _aggregator_ to one or more channels. The aggregator receives messages from a background thread and stores them in a queue that MATLAB can access in a synchronous manner using _aggregator.getNextMessage()_. Each message contains the raw bytes as well as some meta data for selecting the appropriate type for decoding.
  
  [source,matlab]
  ----
  