In PTC Mathcad Prime, math elements are marked with one of several labels, such as the unit or the constant label. Labels help you to easily distinguish between different math elements.
Using Labels
When possible, PTC Mathcad Prime automatically assigns a label to a math element. You can also apply a label to a specific math element.
Using labels, you can define multiple math elements using the same name. For example, type the following:
As expected, PTC Mathcad Prime automatically assigns the unit label to the kg, cm, and m to the right of the equations. Also, for the evaluations, PTC Mathcad Prime uses the latest definition. To clarify your intention, you can apply the constant label on the m’s in the first column:
Now, throughout your worksheet, m can either mean 2kg or 1m, depending on its label.
When you click on a math element, its label appears on the Math tab, in the Style group:
• If a label appears with parentheses then it is a label that PTC Mathcad Prime assigns according to its context.
• If a label appears without parentheses then it is a label applied by the user or a label that is inferred by calculation.
Before you define or evaluate a math element, it has no label.
Label Types
The following labels are available:
• Automatic—PTC Mathcad Prime automatically assigns a label based on the calculation. For example, if you calculate the value of m, the system resolves m as the built-in unit meter.
• Variable—Identifies user-defined variables and user-defined functions.
• Unit—Identifies built-in units.
• Constant—Identifies built-in constants.
• Function—Identifies built-in functions.
• System—Labels the following build-in system variables: ORIGIN, TOL, CTOL, PRNPRECISION, PRNCOLWIDTH, and CWD.
• Keyword
—Sets the math element to a keyword, which is a special function construct. Solve block keywords include find, minerr, maximize, minimize, and odesolve. Other keywords are if and root.
You can use the keyboard shortcut Ctrl+Q to cycle through the above labels.