Prev: Fast Matrix Exponential
Next: Sorting Question
From: James Tursa on 4 May 2010 11:20 "Bjørnar " <bjornar.lund(a)sintef.no> wrote in message <hrp3ug$ckq$1(a)fred.mathworks.com>... > "James Tursa" <aclassyguy_with_a_k_not_a_c(a)hotmail.com> wrote in message <hrmk4t$anu$1(a)fred.mathworks.com>... > > "Bjørnar " <bjornar.lund(a)sintef.no> wrote in message <hrmc21$mt4$1(a)fred.mathworks.com>... > > > I want to create a DLL from my MATLAB code for use in a FORTRAN project. Is it possible? From the documentation it seems that only C/C++ is supported? > > > > > > with regards > > > Bjørnar Lund, Trondheim, Norway > > > > What is this dll going to do? What version of Fortran are you going to use? > > > > James Tursa > This DLL is a purely numerical solver (ODE problem using the bvp4c function). > I am currently using the Intel FORTRAN 10.0.025 compiler embedded in MSVS 2005. > - Bjørnar Do you intend for the ODE solver to call Fortran functions? If so, then I would suggest doing a mex implementation (as opposed to an engine implementation) to make the MATLAB-Fortran calling easier. You can look in the doc under External Interfaces API for some basic help with this. James Tursa
From: Bjørnar on 6 May 2010 18:51
"James Tursa" <aclassyguy_with_a_k_not_a_c(a)hotmail.com> wrote in message <hrpdvl$3b$1(a)fred.mathworks.com>... > "Bjørnar " <bjornar.lund(a)sintef.no> wrote in message <hrp3ug$ckq$1(a)fred.mathworks.com>... > > "James Tursa" <aclassyguy_with_a_k_not_a_c(a)hotmail.com> wrote in message <hrmk4t$anu$1(a)fred.mathworks.com>... > > > "Bjørnar " <bjornar.lund(a)sintef.no> wrote in message <hrmc21$mt4$1(a)fred.mathworks.com>... > > > > I want to create a DLL from my MATLAB code for use in a FORTRAN project. Is it possible? From the documentation it seems that only C/C++ is supported? > > > > > > > > with regards > > > > Bjørnar Lund, Trondheim, Norway > > > > > > What is this dll going to do? What version of Fortran are you going to use? > > > > > > James Tursa > > This DLL is a purely numerical solver (ODE problem using the bvp4c function). > > I am currently using the Intel FORTRAN 10.0.025 compiler embedded in MSVS 2005. > > - Bjørnar > > Do you intend for the ODE solver to call Fortran functions? If so, then I would suggest doing a mex implementation (as opposed to an engine implementation) to make the MATLAB-Fortran calling easier. You can look in the doc under External Interfaces API for some basic help with this. > > James Tursa No, the ODE solver does not call any Fortran functions. My solver routine is being called from an existing Fortran program. So to save myself of the work of rewriting my MATLAB solver routine and the bvp4c into Fortran I wanted to convert it to a library to be linked with the Fortran program. I have tried to link a small MATLAB application (from the MATLAB samples) to a Fortran program via a C shared library, but so far unsuccessful. My best option is probably to rewrite my solver routine into Fortran and find a Fortran replacement of bvp4c. -Bjørnar |