# filters.matlab¶

The Matlab Filter allows Matlab software to be embedded in a Pipeline that interacts with a struct array of the data and allows you to modify those points. Additionally, some global Metadata is also available that Matlab functions can interact with.

The Matlab interpreter must exit and always set “ans==true” upon success. If “ans==false”, an error would be thrown and the Pipeline exited.

writers.matlab can be used to write .mat files.

Note

filters.matlab embeds the entire Matlab interpreter, and it will require a fully licensed version of Matlab to execute your script.

Dynamic Plugin

This stage requires a dynamic plugin to operate

## Example¶

[
{
"filename": "test\/data\/las\/1.2-with-color.las",

},
{
"type": "filters.matlab",
"script": "matlab.m"

},
{
"filename": "out.las",
"type": "writers.las"
}
]


## Options¶

script
When reading a function from a separate Matlab file, the file name to read from. [Example: “functions.m”]
source
The literal Matlab code to execute, when the script option is not being used.