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

Home » Public Forums » archive » Re: Extracting info from the ASCII file with IDL
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: Extracting info from the ASCII file with IDL [message #73587 is a reply to message #73586] Thu, 18 November 2010 08:40 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Nov 18, 10:38 am, Sasha Singh <sashasingh....@gmail.com> wrote:
> Hi,
> I have a ASCII text file whose entries look like this
>
> 111          AA          25    XX
> 111          AB          -5     XX
> 222          AC          25    XX
> 222          AD          20    XX
> 222          AE          21    XX
> 333          AF          88    XX
> 444          AG          21    XX
> 444          AH          90    XX
> and so on.....
> In this file the first column represents a unique number refering to
> an experiment. Any particular experiment
> was repeated a random number of times, such as experiment 111 was
> repeated twice, experiment 222 was
> repeated 3 times, experiment 333 was done only once. I need to know
> how many unique experiments were done.
> To clarify it further, in above example 4 experiments (111, 222, 333
> and 444) were done. I need to know this in a file which has 1300 rows.
> Please help.

Use READCOL from the NASA IDL astronomy library to read the first
column. Then do n_elements(uniq(data,sort(data))).
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Extracting info from the ASCII file with IDL
Next Topic: Re: PostScript Background Color Preference

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

Current Time: Sat Oct 11 18:48:04 PDT 2025

Total time taken to generate the page: 0.80003 seconds