Signal Processing Toolbox    

Exporting to a C Header File

You may want to include filter information in an external C program. To create a C header file with variables that contain filter parameter data, follow this procedure:

  1. Select Export to C Header File from the File menu. The Export to C Header File dialog box appears.

  2. Enter the variable names to be used in the C header file. The particular filter structure determines the variables that are created in the file

    Filter Structure
    Variable Parameter
    Direct Form I
    Direct Form II
    Direct Form I transposed
    Direct Form II transposed
    Numerator, Numerator length*, Denominator, Denominator length*, and Number of sections (inactive if filter has only one section)
    Lattice ARMA
    Lattice coeffs, Lattice coeffs length*, Ladder coeffs, Ladder coeffs length*, Number of sections (inactive if filter has only one section)
    Lattice MA
    Lattice coeffs, Lattice coeffs length*, and Number of sections (inactive if filter has only one section)
    Direct Form FIR
    Direct Form FIR transposed
    Numerator, Numerator length*, and Number of sections (inactive if filter has only one section)

    *length variables contain the total number of coefficients of that type.

  1. Select Export Suggested to use the suggested data type or select Export As and select the desired data type from the pull-down.

  1. Click OK to save the file and close the dialog box or click Apply to save the file, but leave the dialog box open for additional C header file definitions.

  Exporting Coefficients or Objects to a MAT-File Exporting to SPTool