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

Home » Public Forums » archive » Re: How can I read data file with tab delimeter?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How can I read data file with tab delimeter? [message #5553 is a reply to message #5548] Thu, 11 January 1996 00:00 Go to previous message
M.W.Gardner is currently offline  M.W.Gardner
Messages: 7
Registered: November 1995
Junior Member
ashi@acacia.lle.rochester.edu (Alexei Chirokikh) wrote:
> Hi,
> I have column organized data with TAB - delimeter. How can I read this data?
>

Assuming your data is organised in a consistent manner (i.e. all rows and
columns contain the same number of data points) then thus is really easy..

Assume your file is organised with 5 columns and 4 rows and contains floating
point data.

The IDL code to read this into the array my_data is as follows

my_data=fltarr(5,4) ;define array of correct dimensions and type
openr,lun,'my_tab_file.dat',/get_lun ;open file
readf,lun,my_data ;read data into array maintaining structure in file
close,lun ;close file
free_lun,lun ;free logical file unit

IDL can reads tabs as multiple space delimiters - you do not have to specify
the fact that the delimiter is a tab.

Hope that helps - if not get in touch.

Matt
--
-----> Matt Gardner EMAIL->m.W.gardner@uea.ac.uk PHONE->+44- 1603-592041
School of Environmental Science,University of East Anglia,Norwich,NR4 7TJ,UK
------------------------------------------------------------ ------------------
opinions are mine - http://www.uea.ac.uk/~e449
[Message index]
 
Read Message
Read Message
Previous Topic: Gif output for Wave
Next Topic: Re: Conversion of Bruker (BioSpec) data to IDL

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

Current Time: Sun Oct 12 04:51:36 PDT 2025

Total time taken to generate the page: 0.55995 seconds