题目描述 Li Zhixiang have already been in “Friendship” ocean-going freighter for three months. The excitement has gradually disappeared. He stands on the board, holding the railing and watching the dazzling ocean in the sun silently. Day after day, the s…
题目描述 Ivan unexpectedly saw a present from one of his previous birthdays. It is array of n numbers from 1 to 200. Array is old and some numbers are hard to read. Ivan remembers that for all elements at least one of its neighbours ls not less than it,…
1/6 LU 分解 LU 分解可以写成A = LU,这里的L代表下三角矩阵,U代表上三角矩阵.对应的matlab代码如下: function[L, U] =zlu(A) % ZLU - LU decomposition for matrix A % work as gauss elimination [m, n] = size(A); if m ~= n error('Error, current time only support square matrix')…
Gauss Elimination bool Gauss(){ int now=1,nxt; double t; R(i,1,n){ //enumerate the column for(nxt=now;nxt<=n;++nxt) if(fabs(a[nxt][i])>eps)break; //find a nonzero element in the ith row as 'nxt' if(now!=nxt) R(j,1,n+1) swap(a[nxt][j],a[now][j]); //e…