[신호처리]FFT의 MATLAB 소스
- 최초 등록일
- 2006.07.21
- 최종 저작일
- 2006.07
- 4페이지/ MS 워드
- 가격 1,000원
소개글
FFT를 MATLAB으로 풀기위한 소스입니다.
잘 되니까 받아서 해보세요.
목차
없음
본문내용
void fft(COMPLEX *x, int m)
{
static COMPLEX *w; // used to store the w complex array
static int mstore = 0; // stores m for future reference
static int n = 1; // length of fft stored for future
COMPLEX u,temp,tm;
COMPLEX *xi,*xip,*xj,*wptr;
int i,j,k,l,le,windex;
double arg,w_real,w_imag,wrecur_real,wrecur_imag,wtemp_real;
if(m != mstore) {
// free previously allocated storage and set new m
if(mstore != 0) free(w);
mstore = m;
if(m == 0) return; // if m=0 then done
// n = 2^m = fft length
n = 1 << m;
le = n/2; //difference between the upper and lower leg indices
// allocate the storage for w
w = (COMPLEX *) calloc(le-1,sizeof(COMPLEX));
if(!w) {
printf("\nUnable to allocate complex W array\n");
exit(1);
}
참고 자료
없음