function root=falseposition(func, x1, x2, threshold)% x1, x2 : 초기경계값% threshold: 반복여부를 결정하는 임계값% root: 가위치법에 의해 최종적으로 구해진 근의 근사값 if feval(func, x1)*feval(func, x2) > 0 % feval(func,x)는 함수값을 계산하는 함수 disp('해는 이 구간에 없습니다.') returnend %rel_error=100.0; % 상대오차 초기값%x3=x1;j=0;fprintf('| iteration | x | error |\n')while(1) j=j+1;% xold=x3; x3=x2-feval(func, x2)*(x1-x2)/(feval(func, x1) - feval(func, x2)..