Main Content


Return default VariableTable object for block

Since R2024a



    VariableTable = simscape.instrumentation.defaultVariableTable(blockName) returns the default VariableTable object, VariableTable, for a given block, blockName. The default variable table displays the block variables that are available for logging, where each row represents a block variable. The table displays the properties of the simscape.instrumentation.VariableConfiguration object associated with each variable. You can apply a modified default variable table to a given block using simscape.instrumentation.setVariableTable, but the simscape.instrumentation.defaultVariableTable function always returns the unmodified variable table.


    collapse all

    This example shows how to get the default variable table for the Load Torque block in the Permanent Magnet DC Motor example model.

    To open the model, enter:


    Retrieve the default variable table for the Load Torque block and save it to the workspace.

    table1 = simscape.instrumentation.defaultVariableTable('PermanentMagnetDCMotor/Load Torque')
    table1 = 
    VariableTable (string ⟼ VariableConfiguration) with 5 variable(s):
                   Name       Unit     Logging
                 _________    _____    _______
        C.w ⟼    <missing>    rad/s     false 
        R.w ⟼    <missing>    rad/s     false 
        S   ⟼    <missing>    N*m       false 
        t   ⟼    <missing>    N*m       false 
        w   ⟼    <missing>    rad/s     false 

    Input Arguments

    collapse all

    Simscape block name, specified as a string scalar, character vector, or a handle.

    Data Types: double | char | string

    Output Arguments

    collapse all

    Default simscape.instrumentation.VariableTable object for the block.

    Version History

    Introduced in R2024a