Using C libraries (FFT) in a s-function simulink
Mostra commenti meno recenti
Hello,
I was trying to find the info but couldnt so thats why I am asking here. I hope is not repeated a hundred times.
I am not a huge expert in C programming, but I want to implement in an s-function the possibility to perform the fft. I have downloaded a library (FFTW3) and usually with different compilers I just need to install the library and the include the header file.
The question is, does it work the same way with the matlab compiler? how do I install the library so I can work with matlab? Actually a code that I am using includes the math.h library but I don't know how that library was installed.
I hope I made my point clear. Thank you very much!
1 Commento
PEDRO HENRIQUE Ulhoa
il 6 Gen 2021
Were you able to solve this problem?
Risposte (1)
José-Luis
il 14 Ott 2012
0 voti
Two options come to mind, either use a mexfile, that allows you to call C/C++ and Fortran routines from Matlab. A mex-file needs to be compiled (from Matlab), with all related bells and whistles, such as the linking of your library.
2 Commenti
Jose A. de Dios
il 14 Ott 2012
José-Luis
il 14 Ott 2012
It's no different than linking libraries in C/C++. If you are going to use mex files, then pass -I -L options to the compiler linking pointing to wherever you library is. Have a look at the mex documentation
Categorie
Scopri di più su Simulink Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!