Duration Arrays

Definition and use of duration arrays in code acceleration

The values in a duration array represent elapsed times in units of fixed length, such as hours, minutes, and seconds. You also can create elapsed times in terms of fixed-length (24-hour) days and fixed-length (365.2425-day) years. With duration arrays, you can represent lengths of time in MATLAB® code intended for code acceleration.


Code Generation for Duration Arrays

Use duration arrays in MATLAB code intended for code generation.

Define Duration Array Inputs

Choose how you want to specify duration array inputs.

Duration Array Limitations for Code Generation

Adhere to code generation restrictions for duration arrays.