Modelit Embedded Web Toolbox for Matlab

 

The Modelit Web Toolbox for Matlab makes it possible to use Matlab as a HTTP server. In this way it is possible to execute Matlab code from a remote computer or browser or to use Matlab in a container framework such as Docker and build complex applications in which containerized Matlab Algorithms are integrated. All this is achieved by only a few lines of code. The toolbox works with the Matlab source code, allowing for easy debugging. But it also works with compiled Matlab code.

 

Embedded Web Toolbox Hello World

 

After installing the toolbox, follow the next steps to run a "Hello World" example:

 

1)  Start Matlab and execute the following line on the command prompt:

modelit.web.server.Server(8081, @(event) event.send(200, 'Hello World')).start()

2)  Open a webbrowser and type: http://localhost:8081 in the address bar

3)  The text "Hello World" generated by Matlab appears in the browser.

 

Online documentation is available at: https://www.modelit.nl/modelit/ToolboxModelit/apis/EmbeddedWebToolbox/functions.html


Embedded Web Toolbox Examples

 

The examples directory contains example callback functions. They can be plugged into the Hello World example:

 

For example:

 

server = modelit.web.server.Server(8081, @InfoCallback).start()

 

or

 

server = modelit.web.server.Server( 8081, @ImageCallback).start()