소개글
[삼삭파,사각파,C언어] C언어로 삼각파와 사각파 구현히기에 대한 자료입니다.
목차
1. 문 제
2. 순 서 도
3. 소 스
1) 사각파 구현하기
2) 삼각파 구현하기
4. 결과 파형
5. 비교 및 분석
본문내용
3. 소 스
1) 사각파 구현하기
#include
#include
#include
#include
#define pi 3.141592
#define size 3600
main()
{
FILE *output;
double *target1;
int i, n;
double sum=0.;
/* file open*/
if((output = fopen("sum.txt","w")) == NULL){
fprintf(stderr,"can't open %s\n","lenna1.bmph.txt");
exit(0);
}
/* memory allocation */
target1 = (double *)calloc(size,sizeof(double));
하고 싶은 말
많은 도움이 되었으면 좋겠습니다. 참고 잘하세요.