수치해석 소스
본 자료는 1페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
해당 자료는 1페이지 까지만 미리보기를 제공합니다.
1페이지 이후부터 다운로드 후 확인할 수 있습니다.

본문내용

c
% xl, xu = lower and upper guesses
% es = (optional) stopping criterion (%) (default = 0.001)
% maxit = (optional) maximum allowable iterations (default = 50)
if func(xl)*func(xu)>0 %if guesses do not bracket a sign change
error(\'no bracketssss\') %display an error message and terminate
end
% default values
if nargin<5, maxit=50; end
if nargin<4, es=0.001; end
% false position
iter = 0;
xr = xl;
while (1)
xrold = xr;
xr = xu - func(xu)*(xl - xu)/(func(xl) - func(xu));
iter = iter + 1;
if xr ~= 0, ea = abs((xr - xrold)/xr) * 100; end
test = func(xl)*func(xr);
if test < 0
xu = xr;
elseif test > 0
xl = xr;
else
ea = 0;
end
if ea <= es | iter >= maxit, break, end
end
root = xr;
falsepos(inline(\'(1.5.*x)./((1+x.^2)).^2-0.65.*atan(1./x)+(0.65.*x)./(1+x.^2)\'),0.48,0.5 )
ans =
0.48086448538221
  • 가격3,360
  • 페이지수5페이지
  • 등록일2012.11.04
  • 저작시기2012.5
  • 파일형식한글(hwp)
  • 자료번호#774167
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니