Main Content

Generate Feature Extraction Simulink Block

Generate MATLAB® code for features you select when you want a Simulink® block that incorporates the feature computations you performed interactively in the app.

You can select all the features in a single feature table, or select only the top-ranked features in that table.

In Feature table, select the feature table you want to work with.

In Features sorted by, choose the ranking algorithm you want to use to order the features for selection. Only the ranking algorithms that you applied during your session appear as options. If you want to generate code for all features regardless of ranking, select None.

In Number of top features, choose how many features you want to generate code for. This option is active only when you are exporting ranked features. If you do not specify a ranking method, the app generates code for all features but features that are restricted for streaming code, as discussed in the following paragraph.

You cannot export computations based on spectral variables that are computed using autoregressive or state-space models. To export spectral features in a streaming function, use the Welch method to compute the spectrum. You also cannot export features based on ensemble statistics variables.

When you click OK, the app generates a Simulink block that includes the streaming code.

For more information, see Export Feature Extraction Function and Simulink Model for Streaming Data.