MATLAB: How to write C code generation for ‘ not available function for standalone generation’

#filtercode#generatecodec#standalonecodecodec

Hi, i can not transfert my matlab algorithme. When I use Matlab Coder to convert it into C code, it build failed with the following error:
The function 'designfilt' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation.
Then i think i need to write a bandpass filter in C code by myself using DFT and inverse fourier transformation, but i really don't know how to write it. May somebody help me ?

Best Answer

Do you need to change your filter over the simulation, if not, then the coder.extrinsic approach, as outlined in the error message, would be a good way to go. Essentially you can use MATLAB to compute the coefficients and then perform the filtering.
HTH