Re: Linking Matlab with Fortran

From: Richard E Maine (nospam_at_see.signature)
Date: 02/28/05


Date: Mon, 28 Feb 2005 07:50:02 -0800

In article
<56d617ed92b47ba083788dfb75cb1b87@localhost.talkaboutprogramming.com>,
 "EricT" <teteigen@online.no> wrote:

> Thanks, but I was already aware of that. [mex]
> The problem is that I change the program a lot, so the point is to get a
> result up quickly without having to open Matlab.

I'm a bit confused as to what you expect here. You don't want to open
Matlab, but you want to use its graphics? I don't think you are going to
get that. There are a couple of ways to call Matlab stuff from Fortran
(or other languages). The aforementioned MEX is one.

I've also called Matlab file-writing routines from Fortran code, which
allows me to write a Matlab-formatted file without bothering to open
Matlab. That sounds somewhat like your request. But it "works" for the
file writing stuff because they don't have much to do with the
interactive gui. I doubt, however, that you are going to have as much
luck using the Matlab graphics without opening the gui - seems to me
like those are a bit closely tied together. You might be able to start
and control the gui automatically, but I don't see how you are going to
avoid opening it up.

Matlab does come with pretty extensive online documentation, including
for all the programmatic interfaces. The documentation is occasionally a
bit confusing/misleading (and sometimes flat wrong), making it sometimes
hard to get the things actually working, but one can usually find at
least something to get started with there if it is a functionality that
Matlab has.

Not really related to your question, but...

</rant>
One of my biggest pains in interfacing with Matlab is that things keep
changing in incompatible ways. I needed to pretty much rewrite an
interface I had between Matlab 4 and 5. Then when going to Matlab 6, not
only did I need to rewrite it again, but I needed to change my user
interface in turn because Matlab 6 didn't even have a replacement
functionality for a feature I was using.

I was already sensitive about the issue of compatibility in the Fortran
standard, but my negative experience in that regard with Matlab has just
reinforced my sensitivity to it.
</end rant>

-- 
Richard Maine                       |  Good judgment comes from experience;
email: my first.last at org.domain  |  experience comes from bad judgment.
org: nasa, domain: gov              |        -- Mark Twain


Relevant Pages

  • Re: "Free" GUI Design?!?
    ... > I just started learning something about GUI design using Fortran & ... perfect GUI. ... Sure Matlab and its specialized ...
    (comp.lang.fortran)
  • Re: Fortran 90 MAT FIle I/O module
    ... >>Christopher Hulbert wrote: ... >>>Rather new to fortran 90. ... >>>interface with C. So, I've decided to write a module to interface to my ... > It's not off-topic as it is specifically about Matlab MAT files. ...
    (comp.soft-sys.matlab)
  • Re:
    ... I've tried Winteracter and I found it very impressive, ... start writing a big GUI... ... While I would be happy to learn how to program a GUI using Fortran, ... comparing my experience on building GUIs with Matlab I see that Fortran ...
    (comp.lang.fortran)
  • Re: interface boilerplate
    ... > procedural interface, I have a lot of functions defined in the matlab ... Here is the matlab interface wrapper ... > returns the current Axes instance) ...
    (comp.lang.python)
  • Re: DFT routine
    ... why dont u use MATLAB.....U can use MATLAB's c++ interface to convert code ... in MATLAB and get it in C++ ... > It is based on FORTRAN and specific to electromagnetic transients ...
    (comp.lang.cpp)