Main Content

getPropertyValues

Get property values of signal and signal finder result object

Since R2022a

    Description

    example

    propVals = getPropertyValues(resultObject,propNames) returns the values of the properties specified in propNames for the signal finder result object, resultObject. propNames must have the names of the properties of the finder result object or the model variable represented by the finder result object.

    Examples

    collapse all

    Find the property values for signals in the slrgex_vdp model.

    Run the following command to access the supporting files used in this example.

    openExample('rptgenext/SimulinkReportGeneratorFilesExample');

    Import the required packages to avoid using long, fully qualified class names.

    import slreportgen.finder.*

    Load the model and search for signals in the model. For each result object, print the Source property.

    model_name = "slrgex_vdp";
    load_system(model_name)
    
    
    finder = SignalFinder(model_name);
    results = find(finder);
    for result = results
        getPropertyValues(result,"Source")
    end
    

    Input Arguments

    collapse all

    Finder result object, specified as an slreportgen.finder.SignalResult object.

    List of properties values to access, specified as an array of strings or cell array of characters.

    Valid propNames elements are:

    • Name

    • Description

    • Source

    • Destination

    • NonvirtualDestination

    • DataType

    • Complexity

    • Dimensions

    • Min

    • Max

    • SampleTime

    • Any property of the signal that is accessible by using dot notation

    If propNames contains invalid properties, the corresponding cell array value is N/A.

    Output Arguments

    collapse all

    Values of the accessed properties, returned as a cell array.

    Version History

    Introduced in R2022a