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.

Templates:
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.

Conventions:

  • 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.

Options

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.
Templates/Refresh
Loads again the template file.
Templates/Gallery
Generate a temporary webpage shown in a browser which gives an overview about all available templates.
Templates/Description,Source
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

Icon
A data table

Output Ports

Icon
The data table that the snippet returns

Popular Predecessors

  • CSV Reader11 %
  • R Snippet9 %
  • Matlab Snippet5 %
  • File Reader4 %
  • Table Creator4 %
  • Row Filter3 %
  • Excel Reader (XLS)3 %
  • Excel Reader (XLS)3 %
  • String To Number3 %
  • Column Appender3 %
  • Missing Value2 %
  • Math Formula2 %
  • List Files2 %
  • Image Reader2 %
  • CSV Reader2 %
  • Column Filter1 %
  • Column Rename1 %
  • Data Generator1 %
  • Scatter Plot1 %
  • Python Source1 %
  • R to Table1 %
  • Decision Tree to Ruleset1 %
  • Python Script1 %
  • Java Snippet< 1 %
  • Counting Loop Start< 1 %
  • Scorer< 1 %
  • Numeric Scorer< 1 %
  • Concatenate< 1 %
  • Joiner< 1 %
  • Value Counter< 1 %
  • XLS Reader< 1 %
  • Inject Variables (Data)< 1 %
  • Hierarchical Clustering< 1 %
  • DB Reader< 1 %
  • File Upload< 1 %
  • String Input< 1 %
  • Python Script (1⇒1)< 1 %
  • GET Request< 1 %
  • Table Manipulator< 1 %
  • Rule-based Row Filter< 1 %
  • Column Filter Configuration< 1 %
  • Copy/Move Files< 1 %
  • Database Connection Table Reader< 1 %
  • Table Reader< 1 %
  • Column Resorter< 1 %
  • GroupBy< 1 %
  • Column Splitter< 1 %
  • Color Manager< 1 %
  • Smiles Directory Reader< 1 %
  • Java Snippet (simple)< 1 %
  • Tags To String< 1 %
  • Python Snippet< 1 %
  • Table Row To Variable Loop Start< 1 %
  • Variable to Table Row< 1 %
  • Database Reader< 1 %
  • Interval Loop Start< 1 %
  • MDS< 1 %
  • Cell Splitter< 1 %
  • Column Rename (Regex)< 1 %
  • Create Table Structure< 1 %
  • Denormalizer< 1 %
  • Partitioning< 1 %
  • Row Sampling< 1 %
  • Ungroup< 1 %
  • Statistics< 1 %
  • Cache< 1 %
  • DB Query Reader< 1 %
  • Distance Matrix Reader< 1 %
  • Excel Reader (XLS)< 1 %
  • File Chooser< 1 %
  • Image Generator< 1 %
  • ImgPlus to PNG Images< 1 %
  • Image Cropper< 1 %
  • Divide...< 1 %
  • Image Reader (Table)< 1 %
  • Parameter Optimization Loop Start< 1 %
  • File Reader< 1 %
  • Number To String< 1 %
  • Merge Variables< 1 %
  • Column Filter< 1 %
  • Column Filter Widget< 1 %
  • Date&Time-based Row Filter< 1 %

Popular Successors

Views

This node has no views

Workflows

Links

Developers

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.