Re: float and string to 1 spreadsheet [message #17964] |
Thu, 18 November 1999 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
bertram_b_smith@yahoo.com (bertram_b_smith@yahoo.com) writes:
> I want to write data to a spreadsheet file for further statistical
> analysis.
Why? IDL is no good for analysis? Shame on you. :-)
> The data values are in a 2D array (float) and the labels of the data
> values are in a 1D array (string, something like: A38A01F3) of the same
> length.
> How can I write the data values and the respective labels to the same
> spreadsheet file?
There are probably several different ways to do this,
but I like to write comma separated value files (*.csv),
which pop into Excel easily. (On my machine I just
double click them.)
Here is a new article I just wrote on the subject.
http://www.dfanning.com/tips/csv_file.html
From the article you can download an IDL program
named WRITE_CSV_DATA that will allow you to write
a 2D array of data, with an optional vector of
column headers, into a CSV file.
Cheers,
David
P.S. Those of you who haven't visited my web page
in some time might want to do so before the end
of the month. There are 13 new articles so far
this month, and a few more still on the way. :-)
http://www.dfanning.com/documents/tips.html
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|