Main Content

ssc2cw

Create variable and statement structures from circuit diagram

Since R2025a

Description

[variables,statements] = ssc2cw(model) creates the variables and statement structures from the Simscape™ diagram defined in model.

This functionality required a license for Simscape.

Examples

collapse all

Open the Simscape™ model of the loop filter attached with this example.

open_system("ThirdOrderPassiveLoopFilter.slx")

Create the variables and statement structures.

[variables,statements] = ssc2cw("ThirdOrderPassiveLoopFilter")
variables = 

  1×6 struct array with fields:

    Name
    Type
    Subcircuit


statements = 

  1×7 struct array with fields:

    Type
    Designator
    Terminals
    Parameters

You can review the variables and statement structures from the base workspace.

Input Arguments

collapse all

Simscape circuit diagram from which the function creates necessary variables and statements structure, specified as a schematic.

The function reads the circuit and subcircuit elements in the model, collects information about the element properties, determines the circuit connections and nodes, then creates the variables and statements structures.

Output Arguments

collapse all

Variables created from Simscape circuit diagram, returned as a structure.

The structure contains the name of the circuit elements, nodes, and subcircuit fields.

Statements created from Simscape circuit diagram, returned as a structure.

There is a statement for each Simscape block in the circuit diagram. The structure contains the type, labels, terminals, and parameters for each statement.

Version History

Introduced in R2025a