Main Content

Export and Share Filters

At the end of a filter design session in the Filter Designer app, you can export the digital filters that you designed or save your session for later.

Use the options under Export to export a filter.

  • Export to MATLAB Workspace — Create variables in the MATLAB® workspace that represent the designed filters. You can export a digital filter as a digitalFilter object, a filter System object™, or coefficient matrices.

  • Export to Simulink — Create blocks in an existing or new Simulink® model to represent and simulate the designed filters, including digital filter cascades. You must have Simulink installed to use this functionality.

  • Export to DSP HDL IP Designer — Use the DSP HDL IP Designer (DSP HDL Toolbox) app to configure hardware-optimized DSP algorithms for your designed filter and generate HDL code for those algorithms.

  • Generate MATLAB Function — Generate MATLAB functions to re-create the designed filters from the command line.

  • Export to File — Generate a C header file or the COE file to construct your designed filter on an external program.

Save and Load Filter Designer Session to share session snapshots or archive them to resume work later. Save the Filter Designer session to a MAT file that contains the designed filters and filter analysis plots.

Export to MATLAB Workspace

To export a filter to the MATLAB workspace, select the filter on the Filters table, click Export on the Designer tab, select Export to MATLAB Workspace, and select the export type.

  • Digital Filter Object — Create a digitalFilter object that represents the selected filter.

  • Filter System Object — Create a System object that represents the selected filter. You must have a DSP System Toolbox™ license to generate a filter System object.

  • Coefficients — Create a set of one or two matrices that represents the numerator and denominator coefficients of the selected filter.

Export to Simulink

To export a filter to Simulink, select the filter on the Filters table, click Export on the Designer tab, select Export to Simulink, and select the export type.

  • DSP Filter Block — Generate a DSP filter block from the selected filter. You must have a DSP System Toolbox license to use this functionality.

  • System of Basic Elements — Generate a subsystem filter block from the selected filter using basic Simulink elements, including sum, gain, and delay blocks.

Depending on the export type, you can set up additional export options, including target Simulink model, filter structure, and input processing.

Export to DSP HDL IP Designer

To export a filter to DSP HDL IP Designer, select the filter in the Filters table, click Export on the Designer tab, select Export to DSP HDL IP Designer. Filter Designer exports the digital filter and opens a new session in the DSP HDL IP Designer app. To learn more about how to configure DSP HDL IP Designer and generate HDL code, see Generate and Verify HDL Code with DSP HDL IP Designer App (DSP HDL Toolbox).

This workflow requires a DSP HDL Toolbox™ license.

Generate MATLAB Function

To generate a MATLAB function, select the filter in the Filters table, click Export on the Designer tab, select Generate MATLAB Function, and select the export type.

  • Digital Filter Object — Re-create a digitalFilter object that represents the selected filter.

  • Filter System Object — Re-create a System object that represents the selected filter. This option requires DSP System Toolbox.

  • Filtering with System Object — Filter an input signal using a System object that represents the selected filter. This option requires DSP System Toolbox.

Export to File

To save your filter as a file, select the filter on the Filters table, click Export on the Designer tab, select Export to File, and select the export type.

  • Generate C Header — Create a C header file with variables that contain filter coefficient data.

  • Generate COE File — Create a Xilinx® coefficients (COE) file that contains filter coefficient data. You must have a DSP System Toolbox license to use this functionality.

Save and Load Filter Designer Session

Save the current Filter Designer session in a MAT file that contains the designed filters and filter analysis plots. To save the session, in the File section under the Designer tab, click Save Session▼ and select Save Session.

  • To save a session for the first time, browse to where you want to save the file, name the file, and click Save.

  • To change the name or location of the session file, click Save Session ▼ and select Save Session As.

Load a MAT file that contains a saved Filter Designer session to resume your work on the app. To load a saved session, in the File section under the Designer tab, click Open Session. Browse to the MAT file saved from a previous session, select it, and click Open. The designed filters and filter analysis plots appear as they were when the file was last saved.

You can alternatively start a new filter design session in Filter Designer. To start a new session, in the File section under the Designer tab, click New Session.

See Also

Apps

Functions

Live Editor Tasks

Topics