Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Fortran mex file for Matlab r2016a

Murat_Yetkin
Beginner
401 Views

Hi,

I have a matlab code but at the middle of code I need to use fortran for 'dgels' command. 

Is there any way to make this fortran code useful in matlab? Now I run 3 different code (matlab-fortran-matlab). Any tutorials about creating a mex file for matlab? I searched a lot but couldnt find a good tutorial about it. 

I use microsoft visual studio 2013, matlab r2016a and intel visual fortran compile 18.0.1.156.

Thank you.

0 Kudos
1 Reply
mecej4
Honored Contributor III
401 Views

Matlab already uses Lapack, and has done so for a number of years. See https://www.mathworks.com/company/newsletters/articles/matlab-incorporates-lapack.html . When you write in Matlab "x = A \ b", and A has more rows than columns, the actual calculation may well be performed by GELS in one of the DLLs.

0 Kudos
Reply