Matlab coder C conversion of an fft
이전 댓글 표시
Can someone give me an example of what an fft should look like within a coder converted c code snippet? I am aware that the documentation says that fft is coder compatible, but I have not yet obtained successful results. What I end up receiving from coder is simply a copy of the input data. any help would be welcome. An example of what I have been testing is below.
function anFFT= fft_soundfile(input)
anFFT = input;
%do fft
X = abs(fft(input,1024));
%fft end
holder = X(1);
%data = abs(y)
end
What I am getting is as follows
/*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* anFFT.c
*
* Code generation for function 'anFFT'
*
*/
/* Include files */
#include "rt_nonfinite.h"
#include "anFFT.h"
/* Function Definitions */
void anFFT(const double input[27387], double b_anFFT[27387])
{
memcpy(&b_anFFT[0], &input[0], 27387U * sizeof(double));
/* do fft */
/* fft end */
/* data = abs(y) */
}
/* End of code generation (anFFT.c) */
This doesn't seem to be generating an fft. Can anyone help with this?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!