Professional Documents
Culture Documents
Scientific Computation
Dingyu Xue
Northeastern University, Shenyang, China
Email: xuedingyu@mail.neu.edu.cn
Materials:
https://mechatronics.ucmerced.edu/Scientific-Computing-with-MATLAB-2ndEd
□ How to find
□ Double-precision solutions
□ Error analysis
□ Symbolic solutions
□ Double-precision
5/19/2018 Dingyü Xue and YangQuan Chen. Scientific Computing 13/53
with MATLAB, 2nd Edition. CRC Press, 2016
□ Analytical solutions
□ Exact Results
4198377534864930331853312344197593106445
8518758576681657377344056575986726555897
1765638419710793303386582324149811241023
5544891661547178096352577978368000000000
00000000000000000000000000
5/19/2018 Dingyü Xue and YangQuan Chen. Scientific Computing 14/53
with MATLAB, 2nd Edition. CRC Press, 2016
Example 1.4 Differential Equations
□ Differential equation solutions
Van der Pol equation, no analytical solution
Stiff equation
Delay differential equation
□ MATLAB code
□ Historically important
□ Strong support for computer math language
□ Not to be over dependent on these packages
– too low level for average researchers.
□ Tedious and rigid to use
□ Should only be just a part of the “computer
math language” but not all.
5/19/2018 Dingyü Xue and YangQuan Chen. Scientific Computing 24/53
with MATLAB, 2nd Edition. CRC Press, 2016
Example: Eigenvalue Problem
□ With EISPACK
C code
□ Exact computation
□ Correct?
5/19/2018 Dingyü Xue and YangQuan Chen. Scientific Computing 29/53
with MATLAB, 2nd Edition. CRC Press, 2016
Possible Errors or Bugs
□ Did not consider whether A*B exist
Modify code
if (L1==L2) multiply, otherwise error
□ Induced error: scalar not considered
More if else statements
□ Any problem?
Complex matrices not considered
□ MATLAB implementation: C = A*B
5/19/2018 Dingyü Xue and YangQuan Chen. Scientific Computing 30/53
with MATLAB, 2nd Edition. CRC Press, 2016
Example 1-10 Plot and Surface
□ Sinusoidal curves
□ Three-dimensional plots
□ How to draw?
MATLAB implementation
□ EISPACK
□ LINPACK
□ The leading-edge LaPACK
□ Provides support to mathematical software
and languages.
MATLAB and
Scilab