MATLAB: How to generate C code of the transfer function from Filter designer app

Signal Processing Toolbox

Do we have provision to generate C code of the transfer function from Filter designer app?

Best Answer

There is no direct way to generate C/C++ code for a transfer function from filterDesigner but you can generate MATLAb code from the app and then use MATLAB coder app to generate C/C++ code.
When you are trying to generate MATLAB code from the app, you will see three different options to do that.
1) Filter Design Function.
2) Filter Design Function (with System Objects)
3) Data Filtering Function (with System Objects)
If you generate MATLAB code with the first two options, the resulting MATLAB code will not be codgen compatible.
The MATLAB code generated with option 3 is codegen compatible. Once the code is generated, use the MATLAB coder app to go through with further process to generate C/C++ code.