Matlab Snippet

This node executes a snippet/script using a local Matlab desktop instance. The Matlab script can be coded manually or templates can be selected from a repository. Templates can be used as such or they can be modified to the users liking.

RGG (R GUI Generator) is used to configure the Matlab code using a graphical user interface in a way that the user does not need to know scripting in Matlab.

Script Editor:
Copy, cut or paste and Matlab code to the editor and/or select the columns from your data table. If a template is loaded used the GUI to adapt the script to the input data.

Select a snippet template from the template repository (double-click or "Use this template") to use that script and see the GUI. The description explains what a snippet does. Then configure the GUI according to your input data.

This node needs a Matlab installation on the local machine!
If Matlab is not running, the node launches an instance of the Matlab desktop. It is recommended to let KNIME launch Matlab. The node can detect open Matlab instances, but this is not foolproof.


  • Snippet input variable name: kIn
  • Snippet output variable name: mOut
  • Supported Matlab types: dataset, table, struct or container.Map
  • While the script input type is defined by the preferences, the output type will be inferred from the output variable
  • The column names for dataset and table Matlab data types are taken from the object properties (VariableDescriptions/VarDesription). For the other types, they will be the same as the input as long as the header does not change.
  • Templates repositories are controlled via the preferences (Menu > KNIME > Preferences > KNIME > Matlab Scripting).

Further reading:
Further documentation can be found on the wiki.
To understand how to use flow variables in the script, please consult RGG XML.


Script Editor/Unlink from Template
Gives access to the Matlab script after adaptation by the GUI.
Script Editor/Edit Template
Gives access to the RGG script.
Loads again the template file.
Generate a temporary webpage shown in a browser which gives an overview about all available templates.
Description explains what this snippet does. Source displays the RGG script.
Templates/Use this template
Click to load the GUI (or double-click onto the template)

Input Ports

A data table

Output Ports

The data table that the snippet returns


This node has no views


  • No workflows found

Further Links


You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.