Define Timetable Inputs

You can define timetable inputs at the command line or in the MATLAB® Coder™ app. Programmatic specification of timetable input types by using preconditioning (assert statements) is not supported.

Define Timetable 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 Timetable Input

Use the -args option:

TT = timetable(A,B,C,'RowTimes',D,'VariableNames',vnames);
codegen myFunction -args {TT}

Provide a Timetable Type

To provide a type for a timetable to codegen:

  1. Define a timetable. For example:

    TT = timetable(A,B,C,'RowTimes',D,'VariableNames',vnames);

  2. Create a type from T.

    t = coder.typeof(TT);
    

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

    codegen myFunction -args {t}
    

Provide a Constant Timetable Input

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

TT = timetable(A,B,C,'RowTimes',D,'VariableNames',vnames);
codegen myFunction -args {coder.Constant(TT)}

Define Timetable Inputs in the MATLAB Coder App

Use one of these procedures:

See Also

| |

Related Topics