Re: Can IDL and MATLAB run together?? [message #32094] |
Wed, 11 September 2002 07:55  |
Liam E. Gumley
Messages: 378 Registered: January 2000
|
Senior Member |
|
|
Brian Huether wrote:
> I have much expertise with MATLAB but am now working at an organization that
> uses IDL. Instead of recreating much of my MATLAB work, is there a way that
> I can have IDL scripts launch MATLAB scripts (and vice versa) and then have
> data sharing amongst them? I suppose this probably is not feasible, huh?
>
> If this isn't possible, can anyone suggest anything or should I simply
> abandon hopes of continuing with MATLAB. Man I will miss the powerful array
> operators in MATLAB as well its cell arrays, etc...
I'm a big advocate of IDL, but I'm also an advocate of allowing people
to use whatever tools they think are best to get the job done. Are the
bosses at your organization so short sighted that they won't buy you a
Matlab license?
People in my organization uses IDL and Matlab every day. We cooperate by
sharing files, preferably in netCDF or HDF format. This is the least
complicated way to ensure interoperability between Matlab and IDL. I
shudder to think of solutions that would involve IDL calling Matlab, or
Matlab calling IDL.
Cheers,
Liam.
|
|
|
Re: Can IDL and MATLAB run together?? [message #32096 is a reply to message #32094] |
Wed, 11 September 2002 07:34   |
btupper
Messages: 55 Registered: January 2002
|
Member |
|
|
On Wed, 11 Sep 2002 11:37:15 +0200, "Brian Huether"
<b_huether@yahoo.com> wrote:
> I have much expertise with MATLAB but am now working at an organization that
> uses IDL. Instead of recreating much of my MATLAB work, is there a way that
> I can have IDL scripts launch MATLAB scripts (and vice versa) and then have
> data sharing amongst them? I suppose this probably is not feasible, huh?
>
> If this isn't possible, can anyone suggest anything or should I simply
> abandon hopes of continuing with MATLAB. Man I will miss the powerful array
> operators in MATLAB as well its cell arrays, etc...
>
Hello,
I don't know diddle about how IDL and MatLab might work together - but
I suspect anything is possible.
Sharing data? If you mean sharing data via files, then you do have
some options... like the myriad netCDF, HDF, CDF etc. You might also
look at the GEN_Read and Gen_Write routines that a number of people
have worked on. These have worked for our purpose of shoving data
between the two applications. These routines are not as generic as
their names imply (at least not yet - modifications, improvements
welcome!) They do seem to handle the row/column major swapping pretty
well which is the trickiest part. (GEN_routines are located at
www.tidewater.net/~pemaquid)
Ben
|
|
|
Re: Can IDL and MATLAB run together?? [message #32130 is a reply to message #32094] |
Wed, 18 September 2002 12:25  |
mule_rocks
Messages: 2 Registered: September 2002
|
Junior Member |
|
|
Both IDL and MATLAB have a "callable" API that in theory you could use
to call one from the other, and vice-versa, but both are designed to
allow you to call the internals as a subroutine (at a very low-level)
from C, so you'd probably have to write some sort of C wrapper to
go-between in both instances.
If you're running on Windows you could use ActiveX technology to get
the two programs to communicate, but then again you have to ask
yourself would it be easier to just transfer data back and forth via
files on disk? Here's an example of pushing data from an IDL session
into MATLAB6's ActiveX Automation Server and making a plot in the
MATLAB workspace:
IDL> oMatlab6=OBJ_NEW('IDLcomIDispatch$PROGID$Matlab_Application_ 6')
IDL> data=DINDGEN(100)
IDL> PLOT, data
IDL> oMatlab6->PutFullMatrix,'fromidl','base',data,data
IDL> oMatlab6->Execute,'plot(fromidl);'
Note that this is IDL 5.5 or newer and MATLAB6(R12) has to be
installed on the computer for this to work.
- AEB
|
|
|