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

Home » Public Forums » archive » Re: read_ascii for many rows / possible to create automatic names for variables
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: read_ascii for many rows / possible to create automatic names for variables [message #57140 is a reply to message #57139] Wed, 05 December 2007 07:40 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Britta writes:

> The first column are seconds, second column - hour, third - minutes,
> fourth - seconds (if idl doesn't count column 2 to 4 as one column) ,
> sixth to tenth - data output from the spectrometer. The result of
> colMeans(6) should be approximately 136 (more or less :-), in the
> original file there are a lot more columns and also more rows). For
> print, colMeans(6) i obtain 1974.44. :-(

Well, if I take the data you sent me, and I run the program
I sent you, then this is what I get:

IDL> print, colmeans(6)
135.808

So, I don't know what the problem might be.

You will have a problem with that first column, since IDL won't
read a number with two decimal points in it, but that is not
changing things otherwise, and if you are not using the first
column, I wouldn't worry about it.

> Is the value 2 in colMeans = Total(data, 2)/rows the number of
> dimensions? Why do i use 2? To obtain a 1-dimensional array (scalar)
> as a result?

The two indicates that the total should be obtained over the
2nd dimension. That is, over the rows. In other words, add up
the values in the columns.

> I'm quite sure that these are really stupid questions for you, so
> thank you for your patience.

No, the stupid questions I refuse to answer. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: array operations and memory consumption
Next Topic: pson + !p.multi + xyouts

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

Current Time: Sat Oct 11 16:18:26 PDT 2025

Total time taken to generate the page: 0.88274 seconds