connect
Class: simscape.multibody.Multibody
Namespace: simscape.multibody
Description
connect(
        links two connectors, mb,connector1,connector2)connector1 and connector2,
        of the components at the top level of the simscape.multibody.Multibody object, mb.
The connect method makes connections only for objects at the top level
        of a Multibody object. You cannot link two connectors from the same
        object.
In general, connections are made between two connectors. However, in some cases, it is necessary to connect three or more connectors together. The figure shows an example of a three-way connection.

The Elbow, LowerArm, and MotorMass
        objects represent three parts of a Multibody object,
        Robot. To connect these objects together, first you connect the
          Elbow and LowerArm objects:
connect(Robot, "Elbow/F", "LowerArm/in");
Then, connect the MotorMass object to Elbow
        object:
connect(Robot, "MotorMass/R", "Elbow/F");
Alternatively, you can connect the MotorMass object to
          LowerArm object:
connect(Robot, "MotorMass/R", "LowerArm/in");
The two options are equivalent. If you need to add a fourth connector to the three-way
        connection, you can connect the fourth connector to any of the three linked connectors,
          F, in, or R.
Input Arguments
Version History
Introduced in R2022a