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.
Prashant Kumar answered .
2025-11-20
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.