Generate Function for Features
Generate MATLAB® code for features you select when you want a command-line version of the computations you performed interactively in the app. The app provides code that reproduces both the preliminary data processing and the feature extraction itself. For example, if you select features that are based on power spectra that you computed in the app, the generated code includes the spectral processing as well as the feature processing.
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 Ranking Algorithm, 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
Use All Features.
In Number of Top Features, choose how many features you want to generate code for.
When you click OK, the app generates the code in a function in the editor.
If you want to customize your selection further, such as by filtering the features for specific inputs or methods, use Generate Function for…. Selecting this option opens a list of all the signals, features, and ranking tables you can choose from, and also opens the Code Generation tab. The Code Generation tab allows you to filter the items in the selection list to refine what the generated code includes. View all your selections together with no filters by clicking Sort by Selection. When your selections are complete, click Generate Function.
For more information, see: