Signal Processing Toolbox Previous page   Next Page

Generating 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 Generate C Header from the Targets menu. The Generate C Header 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.

Previous page  Exporting to Simulink Generating an M-File Next page

© 1994-2005 The MathWorks, Inc.