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

Home » Public Forums » archive » Writing float array to file
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: Writing float array to file [message #91428 is a reply to message #91426] Tue, 14 July 2015 03:22 Go to previous message
Nikola is currently offline  Nikola
Messages: 53
Registered: November 2009
Member
It means that you're missing the unit in the call of PRINTF

b1=foldername[f]+'\b1.csv'
OPENW, 1, b1
PRINTF, 1, variables[0]
CLOSE, 1

Anyway, it likely won't do what you want as variables[0] is just the first element of your matrix.

b1 = foldername[f]+'\b1.csv'
OPENW, un, b1, /get_lun
PRINTF, un, variables
FREE_LUN, un

In any case what you'll get is not really a csv (comma separated values) file. If that's what you want, then try to google how to write csv from IDL. If you plan to use the data for further analysis in IDL, csv is not very smart choice - one would rather go for plain ascii table, binary or the native IDL .sav format.




On Tuesday, July 14, 2015 at 9:56:16 AM UTC+1, Kai Heckel wrote:
> Hey there!
>
> I have a quite simple problem but I didn't find a solution yet.
>
> Given a float array with the dimensions 2048*5492 ("variables[0]"), I want to put these files in a .csv-file...
>
> This is what I have:
>
> b1=foldername[f]+'\b1.csv'
> OPENW,1,b1
> PRINTF,variables[0]
> CLOSE,1
>
> The error I get is:
>
> PRINTF: Expression must be a scalar or 1 element array in this context: <FLOAT Array[2048, 5492]>.
>
> What does it mean?
>
> Thanks
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Advice on using julian day with the image function?
Next Topic: Compare satellite images

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

Current Time: Wed Oct 08 11:41:39 PDT 2025

Total time taken to generate the page: 0.00427 seconds