This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Change time units of dynamic system


sys_new = chgTimeUnit(sys,newtimeunits)


sys_new = chgTimeUnit(sys,newtimeunits) changes the time units of sys to newtimeunits. The time- and frequency-domain characteristics of sys and sys_new match.

Input Arguments


Dynamic system model


New time units, specified as one of the following values:

  • 'nanoseconds'

  • 'microseconds'

  • 'milliseconds'

  • 'seconds'

  • 'minutes'

  • 'hours'

  • 'days'

  • 'weeks'

  • 'months'

  • 'years'

Default: 'seconds'

Output Arguments


Dynamic system model of the same type as sys with new time units. The time response of sys_new is same as sys.

If sys is an identified linear model, both the model parameters as and their minimum and maximum bounds are scaled to the new time units.


collapse all

Create a transfer function model.

num = [4 2];
den = [1 3 10];
sys = tf(num,den);

By default, the time unit of sys is 'seconds'. Create a new model with the time units changed to minutes.

sys1 = chgTimeUnit(sys,'minutes');

This command sets the TimeUnit property of sys1 to 'minutes', without changing the dynamics. To confirm that the dynamics are unchanged, compare the step responses of sys and sys1.


The step responses are the same.

If you change the TimeUnit property of the system instead of using chgTimeUnit, the dynamics of the system do change. To see this, change the TimeUnit property of a copy of sys and compare the step response with the original system.

sys2 = sys;
sys2.TimeUnit = 'minutes';

The step responses of sys and sys2 do not match. For example, the original rise time of 0.04 seconds changes to 0.04 minutes.


  • Use chgTimeUnit to change the time units without modifying system behavior.

See Also

| | | | | | | | |


Introduced in R2012a