Silverfrost Forums

Welcome to our forums

Is it possible to use Salford DLLs with C++.Net Gateway DLLs in Matlab?

14 Jun 2005 2:39 #198

Hello!

I just upgraded to Salford 4.8. I'm trying to start a Salford DLL from a C++ mex funktion in Matlab 7.0. If I do so in Simulink Matlab crashes imediately without any usefull error message. From the Matlab prompt I recieve this:

??? Unknown Windows exception value=c0000090 in MATLAB. I looked it up and it's a floating point exception. I could determin the operation causing it on the fortran side by writing a test file.

  1. I can pass a constant from fortran to Matlab.
  2. I can pass arguments from matlab to fortran and back without a crash.
  3. But the moment I try to calculate with Matlab originated data I have problems.

I tested it with integer conversion nint(). The first time I call it from the prompt everything is fine. I get the correct result. But on the second call I get the error mentioned above.

Any idea how to solve my problem with salford? Thank's for your help! Martin

21 Jun 2005 12:46 #202

In principle is it possible to use an FTN95 DLL as a mex function in Matlab. However, you will need guidelines on how to do this. I hope to provide details in the Knowledge Base before too long. You may be able to make some progress given the following two points.

  1. You must use F_STDCALL in the declarations of all exported subroutines in your DLL.
  2. Currently there is an intialisation bug that causes the first call to the DLL (from Matlab) to raise an exception. Subsequent calls are OK.
18 Jul 2006 4:25 #869

Helene

There is now some information on using MATLAB with FTN95 in the Silverfrost forum KBase.

Please login to reply.