푸리에 급수 찾기 C언어
- 최초 등록일
- 2008.03.09
- 최종 저작일
- 2007.05
- 2페이지/ 한컴오피스
- 가격 1,000원
소개글
푸리에 급수 찾기 C언어
목차
◉ C 소스
◉ 실행 결과
본문내용
◉ C 소스
//#include <graph.h> //window에서 사용할 수 없는 헤더 파일
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
double fx[]={3,1.707,0,1.707,3,0.293,-2,0.293},fAR[8]={0},fAI[8]={0};
void main(void)
{
int iCount,iCount2;
//_clearscreen (_GCLEARSCREEN);
printf(PROGRAM 7: Discrete Fourier Seriesn);
printf(for real signal with 8 sample valuesnn);
for(iCount2=1;iCount2<9;iCount2++)
for(iCount=1;iCount<9;iCount++)
{
fAR[iCount2-1]=fAR[iCount2-1] + (1.0/8.0) * fx[iCount-1] * (1+ 2 * cos (0.5 * 3.141593 * (float)(iCount2-1) * (float)(iCount-1) / 8.0));
fAI[iCount2-1]=fAI[iCount2-1] - (1.0/8.0) * fx[iCount-1] * ( sin (0.25 * 3.141593 * (float)(iCount2-1) * (float)(iCount-1) / 8.0));
}
for(iCount2=0;iCount2<8;iCount2++)
printf(%d %f, %fn,iCount2,fAR[iCount2],fAI[iCount2]);
}
참고 자료
디지털 신호 처리