| Contents | Index |
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.
Use chgTimeUnit to change the time units without modifying system behavior.
sys | |
newtimeunits |
New time units, specified as one of the following strings:
Default: 'seconds' |
sys_new |
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. |
This example shows how to change the time units of a transfer function model.
Create a transfer function model.
num = [4 2]; den = [1 3 10]; sys = tf(num,den);
The default time units of sys is seconds.
Change the time units.
sys1 = chgTimeUnit(sys,'minutes');
The TimeUnit property of sys1 is milliseconds.
Compare the step responses of sys and sys1.
step(sys,'r',sys1,'y--');
legend('sys','sys1');

The step responses of sys and sys1 match.
(Optional) Change the TimeUnit property of sys, and compare the step response with the original system.
sys2=sys;
sys2.TimeUnit = 'minutes';
step(sys,'r', sys2,'gx');
legend('sys','sys2');Changing the TimeUnit property changes the original system. Therefore, 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.

chgFreqUnit | frd | pid | ss | tf | zpk

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |