Main Content


List kinematic variables assigned as targets


targetVariables(ks) outputs a table that lists the target variables in the KinematicsSolver object ks. Each row shows the details of a variable. For a joint variable, the table shows the ID, joint type, block path, and unit. For a frame variable, the table shows the ID, base and follower frames, and unit.

Both joint and frame variables can serve as targets. Note that there are a few limitations for variables to be assigned as targets. See addTargetVariables for more details. To assign a variable as target, use the addTargetVariables object function. To remove target variables, use the removeTargetVariables object function to drop target variables that are no longer needed for the analysis, or use the clearTargetVariables object function to drop all target variables in one call.

During a search, the target variables serve as constraints of the system, and the solver searches for a solution that is compatible with the targeted joint and frame variables. Do not overconstrain the system with target variables. A system is overconstrained if a kinematic loop in the system has a target for every joint. One way of avoiding overconstraining is to reassign one of the joint variables from a target to an initial guess by using the addInitialGuessVariables object function.

Input Arguments

collapse all

Kinematics solver object, specified as a KinematicsSolver object that is the representation of the Simscape™ Multibody™ model used for kinematic analysis.

Example: ks = simscape.multibody.KinematicsSolver("DoublePendulumExample​'​')

Version History

Introduced in R2019a