excel - Pseudoinverse computation using VBA and C++ DLL -


i want pseudoinverse big degenerate matrix using vba in excel (analog of wide-known "pinv" function). understand excel tools can't deal degenerate matrices.

i found nothing better try implement c++ dll library , link vba. faced following problems:

my configuration is: windows 10 x64, office 16 x64. create dll vs 2015 x64 dll. have managed create , link simple dll , pass , double arrays. when came use math libraries such armadillo dynamically linked blas, mess arose.

any working , debugged code uses blas x64 dll in case being wrapped dll , invoked vba crashes excel. checked dependencies , put blas/lapack dlls every suitable folder. crashes don't use passed parameters. proc monitor shows dependencies ok. looks when excel calling function dll prevents external calls dll.

possibly little late , not asked finished writing vba subroutine calculates moore-penrose pseudoinverse of matrix might still helpful you. follows similar processes matlab's "pinv" function , produces comparable results. can code link below. there's comparison between results of vba , matlab functions summarised in table.

http://www.nicksfinancetricks.com/index.php/2017/01/08/moore-penrose-pseudoinverse-calculation/

there 3 main components algorithm, these include qr factorisation via gram-schmidt orthogonalisation, singular value decomposition (svd), , removal of singular values pseudoinverse can formulated.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -