huangenyan / MathSwift

Matrix computation Framework for iOS, written in Swift 4
MIT License
6 stars 2 forks source link

svd issue #5

Closed ghelfer closed 7 years ago

ghelfer commented 7 years ago

I compare your SVD function with wannyk and the results are different. Mathlab shows same wannyk solution. For use wannyk svd you need to 'flat' the matrix as an array of columns and inform its size (m x n). Thanks,

huangenyan commented 7 years ago

I have fixed the error. It is due to a mistake when calculating transpose matrix for non-square matrix. The new version 2.3 should now produce the correct answer.