How can I check the units of measure for signals in SIMULINK?

Illustration
jasminemichae - 2020-09-17T09:42:42+00:00
Question: How can I check the units of measure for signals in SIMULINK?

I would like to assign units to Simulink signals and I would like SIMULINK to diagnose"unit mismatch operation" like to pass signals with different units to a SUM block.

Expert Answer

Profile picture of Prashant Kumar Prashant Kumar answered . 2025-11-20

The ability to set a "Units of measure" attribute to signals or block inports is not available in Simulink.
You can exploit Simulink Data Objects to explicitly set units to a signal as follows:
 
 
s=Simulink.Signal

You can set the field "DocUnits" of the signal "S" as follows:

s.DocUnits='RPM'

However, Simulink will not check the units of this signal when added to another signal.The DocUnits property is only for documentation.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!