I am trying to use Least Squares Minimization to solve a the matrix problem: b = A*x for x. The system is overdetermined, and A is a dense matrix.
In the LAPACK library, I believe the routine DGELSY to be the best suited for this problem (or whatever is closest to Matlab's LSQMINNORM function). However, I am a relative amateur at coding, and Fortran in particular, and am having issues with the inputs for this function.
Thy syntax is as follows:
call dgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info)
(Here is the site for the documentation: https://software.intel.com/en-us/mkl-developer-reference-fortran-gelsy).
For example, let A be a 40,000 x 3,000 matrix, b is a 40,000 element vector, and x is a 3,000 element vector.
Question: What should the inputs for DGELSY should be in this case?
[Aside: If there is a LAPACK function that is better suited to solving this problem, feel free to let me know!]