Newbie: How to create a low pass that can be exported into c++?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everyone,
I am a c++ developer and COMPLETELY new to matlab. I read that matlab can help me with low pass filtering a signal. my signal has a x and y int16 component and in my c++ application one can change sample rate and cutoff frequency. I have watched a tutorial and read some posts, i.e. http://www.mathworks.com/matlabcentral/answers/37975-how-to-design-an-iir-low-pass-filter-with-matlab but I am still stuck.
my goal is to have a c++ function that i can just pass my signal data to on the fly, the signal is not prerecorded. so i was thinking one could initialize a butterworth low pass with sample rate and cutoff frequency like: fdesign.lowpass('N,F3db', 3, 0.5, 2000); and then continuously run the incoming data through the filter. when the user changes the cutoff frequency the filter would be reinitialized.
i know how to create c++ code from a matlab project, but can someone point me in the right direction how the matlab functions should look like?
thanx!!
0 comentarios
Respuestas (2)
Wayne King
el 28 de Jul. de 2012
Which MathWorks' products do you have? If you have MATLAB Coder, the Signal Processing Toolbox, and the DSP System Toolbox, you can easily write a filter design and implementation routine in MATLAB that you can port directly to C/C++ code with codegen
0 comentarios
Ver también
Categorías
Más información sobre C Code Generation en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!