setVariableUnit

Change physical unit of kinematic variable

Description

removeOutputVariables(ks,id,unit) changes the physical unit of the kinematic variable id in the KinematicsSolver object ks to the measure given in unit. That measure must be a valid unit, and the unit must be appropriate for the variable—a length for translation variables and an angle for rotation variables. Rotation axis components, used in spherical joint primitives, must remain unitless.

The new unit applies to every instance of the specified variable: if the variable appears in several variable groups, the unit takes effect in each of the groups.

Input Arguments

collapse all

Name of the KinematicsSolver object for which to run the analysis. The object is a kinematic representation of the model from which it derives. It contains the variables upon which the analysis depends.

Example: 'fourBarKS'

Data Types: char | string

Identifier for the kinematic variable whose units to change. Enter the identifier as shown in the ID column of the jointVariables table, for joint variables, or frameVariables table for frame variables.

Example: 'j1.Rz.q'

Data Types: char | string

New unit for the variable id of the object ks. The unit must be valid and appropriate for the type of variable. Translational variables must be in units of length and rotational variables must be in units of angle.

Example: 'ft'

Data Types: char | string

Introduced in R2019a