셈툴 다운로드

셈툴 튜토리얼

공학수학 | 수치 오차(numerical errors) |

페이지 정보

작성자 cemtool 작성일14-06-11 12:01 조회7,717회 댓글2건

본문

다음과 같은 일차 연립방정식을 생각해보자.
이 연립방정식의 정확한 해는 x= [1,1,1,1,1]이다. 행렬 A는 5차 힐버트 행렬(Hilbert matrix)로서, 불량조건(ill conditioned)을 가진 대표적인 행렬이다. 따라서, 수치 오차로 인해 연립방정식 A x=b의 해를 정확하게 구할 수 없게 된다. CEMTool을 이용하여 주어진 힐버트 행렬의 조건수 (condition number)를 구하여라. 그리고, 위 연립방정식의 해를 구하고, 수치 오차로 인해 얼마 나 잘못된 결과를 얻게 되는지 확인하여라.
ex3_17.cem
/*
 Example 3.17 Numerical errors
*/
 
// Solve A*x=b for A a 5x5 Hilbert matrix
// x=[1 1 1 1 1] is answer; xcomp is computed vector
 
A=hilb(5);    // Hilbert matrix
b=[137/60 87/60 459/420 743/840 1879/2520]';
x=[1 1 1 1 1];     // Exact answer      
 
// Check condition number and solve
set format long    // Format decimal values
msgprint("Condition number and error in xcomp:")msgprint(" ")condA=cond(A)      // Display condition number
xcomp=A\b;         // Computed value of solution
msgprint(" ")msgprint("Error in calculated value xcomp(I), I=1,5")msgprint(" ")xerror=xcomp - x'
Condition number and error in xcomp:
 
condA = 
   4.766072502417230e+005
 
Error in calculated value xcomp(I), I=1,5
 
xerror = 
   1.0e-12 *
   -0.01854072451124
    0.16808776592825
   -0.25046631435544
   -0.11202150318468
    0.22959412149248
실행 결과는 위와 같다.
댓글목록

한지민님의 댓글

한지민 작성일

<a href="https://bytel.co.kr/">우리카지노</a>
<a href="https://bytel.co.kr/theking/">더킹카지노</a>
<a href="https://bytel.co.kr/first/">퍼스트카지노</a>
<a href="https://bytel.co.kr/yes/">예스카지노</a>
<a href="https://bytel.co.kr/coin/">코인카지노</a>
<a href="https://bytel.co.kr/thenine/">더나인카지노</a>