arr7[i] = arr1[i] - arr4[i]; //将近似值矩阵的元素代入 }
//计算ly的值
for (int i = 1; i <= 2 * (n - 1); i += 2) {
arr7[i] = arr1[i] - arr4[i]; //将近似值矩阵的元素代入 }
/* 对于所有像点的坐标观测值,一般认为是等精度量测,所以权阵P为单位阵.
所以X=(ATA)-1ATL */ //1.计算AT
double[,] arr5T = new double[6, 2 * n]; for (int i = 0; i < 6; i++) {
for (int j = 0; j < 2 * n; j++) {
arr5T[i, j] = arr5[j, i]; } }
//A的转置与A的乘积,存放在arr5AA中 double[,] arr5AA = new double[6, 6]; for (int i = 0; i < 6; i++) {
for (int j = 0; j < 6; j++) {
arr5AA[i, j] = 0;
for (int l = 0; l < 2 * n; l++) {
arr5AA[i, j] += arr5T[i, l] * arr5[l, j]; } } }
nijuzhen(arr5AA);
//arr5AA经过求逆后变成原矩阵的逆矩阵 //arr5AA * arr5T存在arr5AARAT
double[,] arr5AARAT = new double[6, 2 * n];
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 2 * n; j++)