수치해석레포트1
본 자료는 미리보기를 지원하지 않습니다.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

수치해석레포트1에 대한 보고서 자료입니다.

목차

/* 수치해석 레포트1-1*/
/* The Incremental Search Method */

/* 수치해석 레포트1-2*/
/* The Bisection Method */

/* 수치해석 레포트1-3*/
/* The Method of False Position */

/* 수치해석 레포트1-4*/
/* Newton-Raphson Method */

본문내용

/* 선행처리기 */
#include
#include
#include
/* 함수 정의문 */
#define f(x) a[4]*pow((x),4)+ a[3]*pow((x), 3)+a[2]*pow((x), 2)+a[1]*(x)+a[0]
/* 본문 */
void main(void)
{
double a[5];
double xi, xd, y1, y2, eps=1.0e-3, del_x=0.1;
/* 파일 입출력을 위한 파일 지정 부분 */
FILE *in, *out;
in=fopen(\"data.in\",\"r\");
out=fopen(\"data.out\", \"w\");
int it_max, it=0;
fscanf(in,\"%lf%lf%lf%lf%lf\", &a[4], &a[3], &a[2], &a[1], &a[0]);
fprintf(out, \"Input [Max Iteration] & [inirial x]:\");
fscanf(in, \"%d%lf\", &it_max, &xi);
fprintf(out, \"\n Initial dx= %f Tolerance= %f\n\", del_x, eps);
while(1){
it++;
xd=xi+del_x;
y1=f(xi);
y2=f(xd);
if(y1*y2>0) xi=xd;
if(y1*y2<0)
if(del_x else del_x=del_x/10.0;
if(y1*y2==0)break;
if(it>it_max){
fprintf(out, \"iteration=%d Check Error!!!!\", it);
exit(1);
}
}
fprintf(out, \"\nf(x)=%10.3lfx^4 + %10.3lfx^3 + %10.3lfx^2 + %10.3lfx + %10.3lf\n\",
a[4], a[3], a[2], a[1], a[0]);
fprintf(out,\"First=%10.3lf \n iteration= %d \n\", xd,it);
fclose(in);
fclose(out);

키워드

incremental,   method,   newton,   bisection,   false,   수치해석,   c언어,   소스
  • 가격1,000
  • 페이지수8페이지
  • 등록일2004.11.26
  • 저작시기2004.11
  • 파일형식압축파일(zip)
  • 자료번호#275536
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니