Communication between Fortran and Matlab -


I am relatively new to communicate with different programming languages ​​and appreciate some help. Actually I have a fortran code and a metLab code. Both codes are initialized first and then have to be run sequentially. Each code needs input from the other when the process repeated repeatedly, then some convergence criteria have reached and the running is over. In order to make Fortran code more complex, not only does it require input from Matlab but also its own first walk. The same is true for Matlab, so as far as I can see that keeping both programs open during the open maintenance process is best because I have so many variables and therefore can not write them in other programs by writing them in a text file And can keep them safe. Next frequency

Therefore, I am trying to do something like this:

Initial convertible A, B, C and D

Fortran:

  Input: A and B calculation ... Output: A (Variables now have new values) and D  

Matlab:

  Input: C and D calculation ... Output: C (Variables now have new values) and B  

Repeat FORTRAN and METBALL until the convergence criteria reach.

The questions are: how does Mattel and Fortran communicate with each other and pass the variable to each other? And how each code can trigger another, but wait for the second code to complete its calculations before continuing?

There are keywords for your favorite search engine "Forrest Makes" is very good documentation / tutorials in MATLAB, You can start:

An MX-file allows you to call a Fortran sub-routine from MATLAB

but I believe That only works if you call Fortune Cats with Maltub. You can easily mateb from Fortran code. M function can not call Your "main" program should be a Matlab .m script, which is the Fortran subtitles defined in the Major file (which is actually a dynamic library).


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -