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

Home » Public Forums » archive » Re: how to convert a row of data in a column?
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 to convert a row of data in a column? [message #82906 is a reply to message #82905] Fri, 25 January 2013 05:44 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den fredagen den 25:e januari 2013 kl. 14:34:58 UTC+1 skrev pan...@gmail.com:
> I am using an external program which returns me a one dimensional array, .i.e. a row of data like this.
>
>
>
> 1 2 5 7 8 9 0
>
>
>
> The problem is that I need to read it as a column of data. I tried to create an array to store it but it doesn't work.
>
> (Here set=[1 2 5 7 8 9 0])
>
>
>
> d=dblarr(1,7)
>
> set=d
>
>
>
> but when I print set on the screen, it is still
>
> 1 2 5 7 8 9 0
>
> instead of
>
> 1
>
> 2
>
> 5
>
> 7
>
> 8
>
> 9
>
> 0
>
>
>
> what can I do?
>
>
>
> Many thanks

I'm not sure what lines you actually executed, because after the ones you posted both set and d should be a (1,7) array of zeros, which would print as a column and not as a row.

If you replace the set=d line with d[0]=set, the d vector should print as

IDL> print,d
1.0000000
2.0000000
5.0000000
7.0000000
8.0000000
9.0000000
0.0000000
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to convert a row of data in a column?
Next Topic: Re: FFT phase?

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

Current Time: Fri Oct 10 18:23:00 PDT 2025

Total time taken to generate the page: 4.23960 seconds