comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Uniting IDL and Matlab
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Uniting IDL and Matlab [message #48411] Tue, 18 April 2006 15:24
George N. White III is currently offline  George N. White III
Messages: 56
Registered: September 2000
Member
On Tue, 18 Apr 2006, Ben Tupper wrote:

> ChristopherFlorio@gmail.com wrote:
>> I'm currently at a point where I have to make an IDL program generate a
>> Matlab friendly array of data points. I don't know much about Matlab
>> and the last postings here, on the subject of IDL/Matlab exchange are
>> out of date. If anyone has any information about how to simplify the
>> process, let me know.
>>
> Hi,
>
> Long ago Nick Wolfe and I wrote a simple IDL <-> MatLab generic file exchange
> system. It worked fine for use to share simple arrays and the like. It
> handles the row vs. column major and big vs. little endian issues. If you
> send me an email I will post it to you.
>
> You might have better success using the scientific data format approach that
> Jan suggested. You'll know best when you try it.

People are using data from NASA SeaDAS, an IDL app that generates hdf
(ver. 4) files, with Matlab and R (the S+ clone). AFAIK, Matlab can read
hdf(4 and 5) while R has only the hdf5 module so h4toh5 is needed. If you
have the choice, hdf ver. 5 is recommended for new implementations.

--
George N. White III <aa056@chebucto.ns.ca>
Re: Uniting IDL and Matlab [message #48416 is a reply to message #48411] Tue, 18 April 2006 06:29 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
ChristopherFlorio@gmail.com wrote:
> I'm currently at a point where I have to make an IDL program generate a
> Matlab friendly array of data points. I don't know much about Matlab
> and the last postings here, on the subject of IDL/Matlab exchange are
> out of date. If anyone has any information about how to simplify the
> process, let me know.
>
Hi,

Long ago Nick Wolfe and I wrote a simple IDL <-> MatLab generic file
exchange system. It worked fine for use to share simple arrays and the
like. It handles the row vs. column major and big vs. little endian
issues. If you send me an email I will post it to you.

You might have better success using the scientific data format approach
that Jan suggested. You'll know best when you try it.

Cheers,
Ben
Re: Uniting IDL and Matlab [message #48418 is a reply to message #48416] Tue, 18 April 2006 00:51 Go to previous message
Jan Kristian Jensen is currently offline  Jan Kristian Jensen
Messages: 10
Registered: February 2006
Junior Member
ChristopherFlorio@gmail.com wrote:
> I'm currently at a point where I have to make an IDL program generate a
> Matlab friendly array of data points.


My strong recomondation is to save the data in a format independent of
both IDL and matlab, but supported by both. HDF or NETCDF may be good
candidates. Unfortunately, the IDL routines and documentation for
reading and writing scientific data formats are rather obscure, but
searching this this group should get you started all right :)



If you find this to cumbersome for some specific problem at hand, you
may try saving the data as a text file. It is very straightforward to
read and write a 2D array this way in IDL and matlab.


Or you may write the data as a 1D array which after reading can be
reformed into the original dimemsions. Both binary and ascii can be
written and read this way. Writing binary data in IDL and reading them
with matlab _*might*_ just work right away, or else you need to sort out
some more details (little v.s. big endian etc. etc.).


You could also check out the "Fortran file formats" in the IDL
documentation, and see if you find something simular in matlab. If you
get this far, I would recomend you to have another look at the HDF or
NETCDF formats.



Good luck!


Jan
--
Jan Kristian Jensen

Remove the obvious from the email adress to email me.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Update Shared memory Structure
Next Topic: IDL 6.2 Array Definition Question (Program code area full)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:22:03 PDT 2025

Total time taken to generate the page: 0.00418 seconds