Filter Design Toolbox    

To Export Quantized Filters

To save your filter design, FDATool lets you export the quantized filter to your MATLAB workspace (or you can save the current session in FDATool). When you choose to save the quantized filter by exporting it, you select one of these options:

Exporting to Your Workspace

To save your quantized filter to your workspace, follow these steps:

  1. Select Export from the File menu. The Export dialog opens.
  2. Select Workspace under Export to.
  3. Under Variable Names, assign a variable name for the quantized filter.

    To overwrite variables that you have in your workspace, select Overwrite existing variables. Clear the check box to ensure that FDATool does not overwrite existing variables when you export the filter.

  1. Click OK to export the filter and close the dialog. Click Apply to export the filter without closing the Export dialog. Clicking Apply lets you export your quantized filter to more than one name without leaving the Export dialog.

    If you try to export the filter to a variable name that exists in your workspace, and you did not select Overwrite existing variables, FDATool stops the export operation and returns a warning that the variable you specified as the quantized filter name already exists in the workspace. To continue to export the filter to the existing variable, click OK to dismiss the warning dialog, select the Overwrite existing variables check box and click OK or Apply.

Getting Filter Coefficients after Exporting

To extract the filter coefficients from your quantized filter after you export the quantized filter to MATLAB, use the celldisp function in MATLAB. For example, create a quantized filter in FDATool and export the filter as Hq. To extract the filter coefficients for Hq, use

which returns the cell array containing the filter reference coefficients, or

to return the quantized coefficients.

Exporting as a Text File

To save your quantized filter as a text file, follow these steps:

  1. Select Export from the File menu.
  2. Select Text-file under Export to.
  3. Click OK to export the filter and close the dialog. Click Apply to export the filter without closing the Export dialog. Clicking Apply lets you export your quantized filter to more than one name without leaving the Export dialog.

    The Export Filter Coefficients to Text-file dialog appears. This is the standard Microsoft Windows save file dialog.

  1. Choose or enter a directory and filename for the text file and click OK.

    FDATool exports your quantized filter as a text file with the name you provided, and the MATLAB editor opens, displaying the file for editing.

Exporting as a MAT-File

To save your quantized filter as a MAT-file, follow these steps:

  1. Select Export from the File menu.
  2. Select MAT-file under Export to.
  3. Assign a variable name for the filter.
  4. Click OK to export the filter and close the dialog. Click Apply to export the filter without closing the Export dialog. Clicking Apply lets you export your quantized filter to more than one name without leaving the Export dialog.

    The Export Filter Coefficients to MAT-file dialog appears. This is the standard Microsoft Windows save file dialog.

  1. Choose or enter a directory and filename for the text file and click OK.

    FDATool exports your quantized filter as a MAT-file with the specified name.


 To Import Quantized Filters Transforming Filters