코멘트 newton-raphson 방법은 한 점에서의 접선을 이용하는 방법으로 적은 반복으로 근을 찾아낼 수 있어 현재 가장 많이 쓰이는 방법이다. 하지만 이 방법을 사용하기 위해서는 함수의 미분값이 필요하다. 이 문제에서는 쉽게 미분값을 구할 수 있었지만 미분을 할 ..
1. Cholesky Method를 이용한 LU decomposition 과 Forward Backward substitution 지난 과제였던 matrix operation 함수와 math 헤더파일를 이용하였다. 그리고 알고리즘은 노트에 필기한 것을 토대로 프로그램을..
매트랩 기초 및 프로그래밍 MATLAB 환경 Command window Workspace Command history 55-16 ans = 39 ans+11 ans = 50 MATLAB 환경 M-file Editor Figure window 스칼라 배정 a=4 a = ..
이분법은 연속함수의 경우 실근의 전후에서 서로 다른 부호의 함수값을 가진다는 특징을 기반으로한 알고리즘이다. 우선 임의의 두 경계값에서의 함수값 부호변화를 검사하고 만약 부호에 변화가 있다면 해당 구간내에 근이 있다는 의미이므로, 그 해당구간을 또 반으로 나누어 부호..
수치해석 Report #1 1. 함수 에 대하여 다음 표를 완성하는 프로그램을 작성하여라. - Biesection method는 근에 대한 접근 방식이 달라 접근 속도를 합리적으로 비교하는 것이 어렵다. 그래서 이 프로 그램에서는 Newton method와 Secont..
method ) { ( Secant method ) I used the Bisection method for excercise 2.2-9, and I used the Secant ... The number of iteration was different one another. - n - Bisection method : 14 times Secant method : ... (p2)); } printf("Solution is %f\n\n",p2); return 0; } (2)Result { (3)Compare to 2.2-9 and 2.3-9 { ( Bisection
The number of iteration was different each other. - n - Bisection method : 14 times Secant method : 5 ... (float x) { if(x>=0)return x; else return (-1) * x; } (2)Result { (3) Compare to 2.2-9 { I used the Bisection
#include extern bisection(double a, double b, double *sol); // 외부 함수 bisection 선언, 인수는 처음의 추측값 ... (x0, x1, &sol)) < 0) // bisection 함수에서의 리턴 값을 받은후 값을 rtn 변수에 저장후 // 이값이 음수 이면 실행 { // something wrong ... x0변수에 값을 입력 받아 저장 printf("Input x1 : "); scanf("%lf",&x1); // 초기 두 번째 guessing 값 입력 받아 저장 if((rtn = bisection