Giter Site home page Giter Site logo

numerical-methods's Introduction

Numerical-Methods

SYSU 凌青老师的数值计算方法 课堂作业

HW1

一、请实现下述算法,求解线性方程组 Ax=b,其中 A 为 nⅹn 维的已知矩阵,b 为 n 维的已知向量,x 为 n 维的未知向量。

(1)高斯消去法。

(2)列主元消去法。

A 与 b 中的元素服从独立同分布的正态分布。令 n=10、50、100、200,测试计算时间并绘制曲线。

二、请实现下述算法,求解线性方程组 Ax=b,其中 A 为 nⅹn 维的已知矩阵,b 为 n 维的已知向量,x 为 n 维的未知向量。

(1)Jacobi 迭代法。

(2)Gauss-Seidel 迭代法。

(3)逐次超松弛迭代法。

(4)共轭梯度法。

A 为对称正定矩阵,其特征值服从独立同分布的[0,1]间的均匀分布;b 中的元素服从独立同分布的正态分布。令 n=10、50、100、200,分别绘制出算法的收敛曲线,横坐标为迭代步数,纵坐标为相对误差。比较 Jacobi 迭代法、Gauss-Seidel 迭代法、逐次超松弛迭代法、共轭梯度法与高斯消去法、列主元消去法的计算时间。改变逐次超松弛迭代法的松弛因子,分析其对收敛速度的影响。

三、在 Epinions 社交数据集(https://snap.stanford.edu/data/soc-Epinions1.html ) 中,每个网络节点可以选择信任其它节点。借鉴 Pagerank 的**编写程序,对网络节点的受信任程度进行评分。在实验报告中,请给出伪代码。

HW2

一、已知 sin(0.32)=0.314567,sin(0.34)=0.333487,sin(0.36)=0.352274,sin(0.38)=0.370920。请采用线性插值、二次插值、三次插值分别计算 sin(0.35)的值。

二、请采用下述方法计算 115 的平方根,精确到小数点后六位。

(1)二分法。选取求根区间为[10, 11]。

(2)牛顿法。

(3)简化牛顿法。

(4)弦截法。

绘出横坐标分别为计算时间、迭代步数时的收敛精度曲线。

三、请采用递推最小二乘法求解超定线性方程组 Ax=b,其中 A 为 mⅹn 维的已知矩阵,b 为m 维的已知向量,x 为 n 维的未知向量,其中 n=10,m=10000。A 与 b 中的元素服从独立同分布的正态分布。绘出横坐标为迭代步数时的收敛精度曲线。

四、请编写 1024 点快速傅里叶变换的算法。自行生成一段混杂若干不同频率正弦的信号,测试所编写的快速傅里叶变换算法。

五、请采用复合梯形公式与复合辛普森公式,计算 sin(x)/x 在[0, 1]范围内的积分。采样点数目为 5、9、17、33。

六、请采用下述方法,求解常微分方程初值问题 y’=y-2x/y,y(0)=1,计算区间为[0, 1],步长为 0.1。

(1)前向欧拉法。

(2)后向欧拉法。

(3)梯形方法。

(4)改进欧拉方法

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.