![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数值分析
文章平均质量分 60
SydneyCarton_
这个作者很懒,什么都没留下…
展开
-
NA-PTA-NA Lab2 求多项式的根
Sample program of judge:#include <stdio.h>#include <math.h>#define ZERO 1e-13 /* X is considered to be 0 if |X|<ZERO */#define MAXN 11 /* Max Polynomial Degree + 1 */double Polynomial_Root(int n, double c[], double a, double b, do.原创 2021-05-29 23:38:51 · 233 阅读 · 1 评论 -
NA-PTA-NA Lab8 Composite Simpson Itegration
Shape RoofThe kind of roof shown in Figure 1 is shaped from plain flat rectangular plastic board in Figure 2.The transection of the roof is a sine curve which fits the function y(x)=lsin(lx) in centimeters. Given the length of the roof, your task is to原创 2021-05-29 23:31:30 · 321 阅读 · 0 评论 -
NA-PTA-NA Lab7 正交多项式拟合的免病态方法
Orthogonal Polynomials ApproximationFormat of function:int OPA( double (*f)(double t), int m, double x[], double w[], double c[], double *eps );Sample program of judge:#include <stdio.h>#include <math.h>#define MAX_m 200#define MAX_n原创 2021-05-27 15:03:09 · 345 阅读 · 0 评论 -
NA-PTA-NA Lab5 正则化幂法求矩阵特征值
Approximating EigenvaluesApproximate an eigenvalue and an associated eigenvector of a given n×n matrix A near a given value p and a nonzero vector x =(x1 ,⋯,xn )T .Format of function:int EigenV(int n, double a[][MAX_SIZE], double *lambda, double原创 2021-04-15 21:32:04 · 317 阅读 · 0 评论 -
NA-PTA-NA Lab6 Cubic Spline插值不要直接解方程
Format of functions:void Cubic_Spline(int n, double x[], double f[], int Type, double s0, double sn, double a[], double b[], double c[], double d[]);double S( double t, double Fmax, int n, double x[], double a[], double b[], double c[], double d[] );.原创 2021-04-15 16:57:10 · 198 阅读 · 0 评论 -
NA-PTA-NA Lab4 Jacobi迭代 与 Gauss-Seidel迭代
Compare Methods of Jacobi with Gauss-SeidelUse Jacobi and Gauss-Seidel methods to solve a given n×n linear system Ax=b with an initial approximation x(0) .Note: When checking each aii , first scan downward for the entry with maximum absolute valu原创 2021-03-24 21:24:55 · 364 阅读 · 0 评论 -
NA-PTA-NA Lab3 线性方程组求解[严格对角占优/正定的Gauss-Seidel法]
There is No Free LunchFormat of function:void Price( int n, double p[] );where int n satisfies that 2< n ≤10000; double p[ ] is passed into the function as an array of prices pi and then will be returned storing the costs of the dishes.Sample原创 2021-03-18 16:42:31 · 277 阅读 · 1 评论 -
NA-PTA-NA Lab1 Hamming级数求和 [递推求级数和以减小误差]
Produce a table of the values of the seriesfor the 3001 values of x, x = 0.0, 0.1, 0.2, …, 300.00. All entries of the table must have an absolute error less than 10^−10. This problem is based on a problem from Hamming (1962), when mainframes were very sl原创 2021-03-07 21:34:11 · 1250 阅读 · 0 评论