Main Content

Define Duration Array Inputs

You can define duration array inputs at the command line. Programmatic specification of duration input types by using preconditioning (assert statements) is not supported.

Define Duration Array Inputs at the Command Line

Use one of these procedures:

Alternatively, if you have a test file that calls your entry-point function with example inputs, you can determine the input types by using coder.getArgTypes.

Provide an Example Duration Array Input

Use the -args option:

D = duration(1:3,0,0);
fiaccel myFunction -args {D}

Provide a Duration Array Type

To provide a type for a duration array to fiaccel:

  1. Define a duration array. For example:

    D = duration(1:3,0,0);

  2. Create a type from D.

    t = coder.typeof(D);

  3. Pass the type to fiaccel by using the -args option.

    fiaccel myFunction -args {t}

Provide a Constant Duration Array Input

To specify that a duration array input is constant, use coder.Constant with the -args option:

D = duration(1:3,0,0);
fiaccel myFunction -args {coder.Constant(C)}

See Also

| (MATLAB Coder) | (MATLAB Coder)

Related Topics