Main Content


Get current parameter values of feature extractor object

Since R2021b



    getExtractorParameters(sFE,featurename) returns the parameters used to extract featurename.


    collapse all

    Create a signalFrequencyFeatureExtractor object and enable the mean frequency, band power, and peak amplitude features.

    sFE = signalFrequencyFeatureExtractor(MeanFrequency=true, ...
    sFE = 
      signalFrequencyFeatureExtractor with properties:
                  FrameSize: []
                  FrameRate: []
                 SampleRate: []
        IncompleteFrameRule: "drop"
              FeatureFormat: "matrix"
       Enabled Features
         MeanFrequency, BandPower, WelchPSD, PeakAmplitude
       Disabled Features
         MedianFrequency, OccupiedBandwidth, PowerBandwidth, PeakLocation

    Get the current parameters for the peak amplitude. Note that not all features have parameters for feature computation.

    params = getExtractorParameters(sFE,'PeakAmplitude')
    params = struct with fields:
             PeakType: "maxima"
        MaxNumExtrema: 1
        MinProminence: []
        MinSeparation: []
        FlatSelection: []

    You can also modify feature parameters. Set the maximum number of peaks to 2 and the minimum peak separation to 3 samples.

    params.MaxNumExtrema = 2;
    params.MinSeparation = 3
    params = struct with fields:
             PeakType: "maxima"
        MaxNumExtrema: 2
        MinProminence: []
        MinSeparation: 3
        FlatSelection: []

    Input Arguments

    collapse all

    Feature extractor object, specified as a signalFrequencyFeatureExtractor object or a signalTimeFrequencyFeatureExtractor object.

    Extracted feature, specified as a string scalar or a character vector.

    If you specify a signalTimeFrequencyFeatureExtractor object in sFE, you can specify a time-frequency analysis method in featurename.

    Data Types: char | string


    • Use the setExtractorParameters function to specify parameters to use when extracting the features that you enabled when creating the feature extractor object.

    Version History

    Introduced in R2021b