Using C libraries (FFT) in a s-function simulink
古いコメントを表示
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 件のコメント
PEDRO HENRIQUE Ulhoa
2021 年 1 月 6 日
Were you able to solve this problem?
回答 (1 件)
José-Luis
2012 年 10 月 14 日
0 投票
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 件のコメント
Jose A. de Dios
2012 年 10 月 14 日
José-Luis
2012 年 10 月 14 日
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
カテゴリ
ヘルプ センター および File Exchange で Simulink Coder についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!