精華區beta NTU-Exam 關於我們 聯絡資訊
課程名稱︰計算數學導論 課程性質︰數學系必修 課程教師︰王偉仲 開課學院:理學院 開課系所︰數學系 考試日期(年月日)︰99.11.08 考試時限(分鐘):110min 是否需發放獎勵金:是 (如未明確表示,則不予發放) 試題 : 2010 Computational Mathematics Midterm Coding Exam Nov 8th, 2010 Problem 1. (a)[3%]Construct a 20 ×20 matrix A whose main diagonal elements are 1, 2,..,20 and the first lower off-diagonal are 219,218..,201.(b)[3%]Construct a 20 ×1 random vector b.(c)Give the solution formulas of x(i), for i=1..,20 ,and then write a MATLAB code to solve Ax=b by using for-loop. Problem 2. [8%]Write MATLAB codes to implement the following algorithm. Let f(t,x)=2x/t+t^(2)e^(t) INPUT endpoints a,b; integer N; initial condition α OUTPUT approximation ω to y at the (N+1) values of t. Step 1 set h=(b-a)/N ; t=a ω=α OUTPUT(t,ω) Step 2 For i=1,2.......,N do Step 3,4. Step 3 Setω=ω+h(t,ω); (Compute ωi.) t=a+ih. (Compute ti. ) Step 4 OUTPUT(t,ω) Step 5 STOP. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.247.157