I have to read multiple data from csv files, and when I want to invert matrix from csv data, I get this:
numpy.linalg.linalg.LinAlgError: singular matrix
and the process get stuck on this section :
J = np.mat([dtdx,dtdy,dtdz]).transpose()
dd = np.mat(ttcal-tt)
dm = (scipy.linalg.inv(J.transpose()*J))*((J.transpose())*(dd.transpose()))
and data from "J" like this :
[[-6.81477651e-03 -7.90320450e-03 6.50533437e-05]
[-6.71080644e-03 -6.00135428e-03 6.50533437e-05]]
and data from "dd" like this :
[[0.00621772 0.00537531]]
i has check this data and i find this :
tes = J.transpose()*J
and the result like this :
[[ 9.14761019e-05 9.41324993e-05 -8.79884397e-07]
[ 9.41324993e-05 9.84768945e-05 -9.04538042e-07]
[-8.79884397e-07 -9.04538042e-07 8.46387506e-09]]
I need to invert this matrix but this data is singular matrix. I have to try on matlab r2017b and running well.
I need to solve this problem on python.
linalg.pinvfrom numpy