I'm having trouble with a linear-algebra problem.
I've got 2 Matrices K (1034*1037) and T (1034*2) and I want to compute the solution W (1037*2) of KW=T.
But k.solve(t)
returns the following error:
Exception in thread "main" java.lang.RuntimeException: Matrix is rank deficient.
at Jama.QRDecomposition.solve(QRDecomposition.java:185)
at Jama.Matrix.solve(Matrix.java:815)
at Main.main(Main.java:59)
What could it mean? I've tried to compute the rank of K to check if it is 1034, but the computation seems to last forever...
What should I do? Any hints would be appreciated.
Here are what the matrices look like (with m = 1024):
// Matrix k
0 u12 u13 ... u1m 1 sx1 sy1
u12 0 u23 ... u2m 1 sx2 sy2
u13 u23 0 ... u3m 1 sx3 sy3
. . . . . .
. . . . . .
. . . . . .
u1m u2m u3m ... 0 1 sxm sym
// Matrix t
tx1 ty1
tx2 ty2
. .
. .
. .
txm tym
If you ask, this is for a Thin-Plate-Splines implementation (Image treatment) :)