Main Content

Define Table Inputs

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

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

Use the -args option:

T = table(A,B,C,'VariableNames',vnames);
fiaccel myFunction -args {T}

Provide a Table Type

To provide a type for a table to fiaccel:

  1. Define a table. For example:

    T = table(A,B,C,'VariableNames',vnames);

  2. Create a type from T.

    t = coder.typeof(T);
    

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

    fiaccel myFunction -args {t}
    

Provide a Constant Table Input

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

T = table(A,B,C,'VariableNames',vnames);
fiaccel myFunction -args {coder.Constant(T)}

See Also

| (MATLAB Coder) | (MATLAB Coder)

Related Topics