MATLAB
A detailed usage guide for installing and using catch22 in MATLAB.
Last updated
A detailed usage guide for installing and using catch22 in MATLAB.
Last updated
Select a card below to access MATLAB-specific usage information.
To get started with installing catch22 in MATLAB, clone the repository to a location of your choice using the following command in Bash/CMD
:
In MATLAB, navigate to the wrap_MATLAB
directory in the cloned repo and call mexAll
from the MATLAB command window. Ensure you include the folder in your MATLAB path to use the package:
Here we outline how you can jump straight into computing catch22 features on your time series data with a basic usage example.
catch22 MATLAB only accepts one univariate time series at a time, with the input being passed in as a column vector. Consider the following example for a single time series of length 10 (i.e., 10 points):
All features are bundled into a function called catch22_all
. By default, the extended catch24 feature set will be computed unless a boolean flag which corresponds to the argument doCatch24
(which can either be set to true
or false)
is used in the function call:
true
-> return the catch24 feature set (catch22 + mean + std. dev.).
false
-> return the standard catch22 feature set.
An array of feature outputs and a cell of feature names (24x1
if catch24, 22x1
if catch22) will be returned by MATLAB. The order in which the feature outputs are returned corresponds to the order in which feature names are returned, e.g., the feature output in vals(1)
corresponds to the feature name names(1)
:
And that's it! You now have all the knowledge you need to apply catch22 to your time series data. To access some of the additional functionality of catch22, keep reading for advanced usage tips and examples.
Ready to explore some of the additional functionality of catch22? Here we provide a usage guide for some of the
If the location and spread of the raw time series distribution may be important for your application, you can enable catch24.
Catch24 is an extension of the original catch22 feature set to include mean and standard deviation, yielding a total of 24 time series features. In MATLAB, users can enable the catch24 feature set by passing the boolean flag true
into the catch22_all
function call:
If you do not wish to compute the full catch22 feature set on your time series, you can alternatively compute each feature (including mean and std. deviation) individually.
To compute individual features in MATLAB, you can call the corresponding function given by catch22_{featureName}
where featureName
is the feature's long name (as in the feature overview table). For example, catch22_DN_HistogramMode_5
can be called to compute the feature DN_HistogramMode_5
. You can retrive all feature names by calling GetAllFeatureNames.
As an example, let's compute only the feature DN_HistogramMode_5
on a single univariate time series:
Note that here we pass our time series as a row vector (1x1000
) to the individual feature function. On the other hand, the catch22_all
function for computing the entire feature set only accepts time series as a column vector (1000x1
).
For each feature, we also include a unique 'short name' for easier reference (as outlined in the feature overview table).
In MATLAB, short names can be included in the output when calling catch22_all
by specifying an additional output:
Now, in addition to the cell of long names and feature values, we also obtain an additional cell (22x1
for catch22, 24x1
for catch24) of short feature names.
Click one of the expandable tabs below to explore commonly asked questions about pycatch22 in MATLAB: