I'm currently building a connection between an external library package and matlab using mex files. Previously, I assembled the matrices in matlab and subsequently exported/imported them using .mat files. Using a mex file linking to the library, I want to be able to directly call some functions to work on the matrices. The mex file is the working, unchanged C-file plus some changes to exchange inputs and outputs (a routine to transfer sparse matrices).
It compiles fine(both with the -lmwlapack -lmblas or with -llapack -lblas), but when running the mexfile, I get an error stating: in "(BLAS) invert" at "src/blas/Algebra.cc:268" Error: invalid argument (argument 4 LAPACK::getrf)
The interesting thing is that it runs just fine in the cpp-file, but it returns this error when running in the matlab environment.
Any suggestions on what might cause this error? Does matlab link to a proprietary blas/lapack library?