Main Content

getPropertyValues

Get property values of signal and signal finder result object

Since R2022a

    Description

    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.

    example

    Examples

    collapse all

    Find the property values for signals in the vdp model.

    Import the required namespaces 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 = "vdp";
    load_system(model_name)
    
    
    finder = SignalFinder(model_name);
    results = find(finder);
    for result = results
        getPropertyValues(result,"Source")
    end
    ans = 1x1 cell array
        {["vdp/x1 Outport: 1"]}
    
    
    ans = 1x1 cell array
        {["vdp/x2 Outport: 1"]}
    
    

    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