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

Home » Public Forums » archive » Re: function to convert string to array???
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: function to convert string to array??? [message #3821 is a reply to message #3816] Fri, 17 March 1995 08:24 Go to previous messageGo to previous message
dnguyen is currently offline  dnguyen
Messages: 4
Registered: May 1994
Junior Member
In article <3k89l3$2ap@news.csus.edu>, Chris McCarthy <chris@quark.sfsu.edu> says:
>
> davis@space.mit.edu wrote:
>>
>> Hi,
>>
>> I was wondering if there is a routine that will read a string and convert
>> it to an array of floats. ...
>
> Have you tried reads?
>
> a = 0.d0 & b = 0.d0 & c = 0.d0
> reads,'9.32323 24323.233 22.124235555d-14',a,b,c
> print,c,b,a
>
>
> -chris
>

Here is another way to do it :

wave > a = ' 100. , 200. , 300. , 400. '
wave > a = '[' + a + ']'
wave > z = execute('myarray = '+a)
wave > info,myarray
myarray FLOAT = ARRAY(4)


Derrick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: idl vs matlab question
Next Topic: 3d histograms

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

Current Time: Fri Oct 10 19:26:38 PDT 2025

Total time taken to generate the page: 1.36296 seconds