|
\na%i=%.10f", n, a);
printf("\tb%i=%.10f", n, b);
printf("\tp%i=%.10f", n, p3);
printf("\tf(p%i)=%.10f", n, f(p3));
z=sqrt(pow(p3-p2,2));
p0=p1;
p1=p2;
p2=p3;
}
}
double f(double x)
{
return(pow(x,2)-3);
}
6.3 뮬러법 e^x-3x^2 [0, 1] 10^-8
#include < stdio.h >
#include < math.h >
void Mul
|
- 페이지 93페이지
- 가격 3,000원
- 등록일 2009.06.11
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
뮬러법
clear all
clc
f='1/3*(sin(x).^3)+1/2*(cos(x).^2)-x'
x0=-1; x1=0; x2=1; err=0.000001;
fprintf('횟수 x(n) \n')
for n=1:10
x=x0; fx0=eval(f);
x=x1; fx1=eval(f);
x=x2; fx2=eval(f);
h0=x1-x0; h1=x2-x1;
D0=(fx1-fx0)/h0; D1=(fx2-fx1)/h1;
a=(D1-D0)/(h1+h0);
b=a*h1+D1;
c=fx2;
x30=x2-[2*c/(b+(b.^2-4*a
|
- 페이지 21페이지
- 가격 3,000원
- 등록일 2011.12.24
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
=(a.real*b.real+a.image*b.image)/c;
d.image=(a.image*b.real-a.real*b.image)/c;
return d;
}
Complex Cplus(Complex a, Complex b)
{
Complex c;
c.real=a.real+b.real;
c.image=a.image+b.image;
return c;
}
Complex Cminus(Complex a, Complex b)
{
Complex c;
c.real=a.real-b.real;
c.image=a.image-b.image;
retu
|
- 페이지 5페이지
- 가격 1,000원
- 등록일 2006.06.01
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|