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

Home » Public Forums » archive » Re: convert string to number
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: convert string to number [message #69947] Mon, 22 February 2010 12:20 Go to next message
Hassan is currently offline  Hassan
Messages: 48
Registered: October 2009
Member
On Feb 22, 2:18 pm, pp <pp.pente...@gmail.com> wrote:
> On Feb 22, 3:44 pm, Hassan <hkhav...@gmail.com> wrote:
>
>> I wonder how I can convert all numbers in each element of the string
>> array to Number format.
>
> white_f=fltarr(3,100)
> reads,white,white_f

thanks a lot.
Re: convert string to number [message #69948 is a reply to message #69947] Mon, 22 February 2010 11:18 Go to previous messageGo to next message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Feb 22, 3:44 pm, Hassan <hkhav...@gmail.com> wrote:
> I wonder how I can convert all numbers in each element of the string
> array to Number format.

white_f=fltarr(3,100)
reads,white,white_f
Re: convert string to number [message #69986 is a reply to message #69948] Thu, 04 March 2010 06:24 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
pp schrieb:
> On Feb 22, 3:44 pm, Hassan <hkhav...@gmail.com> wrote:
>> I wonder how I can convert all numbers in each element of the string
>> array to Number format.
>
> white_f=fltarr(3,100)
> reads,white,white_f

by type casting?

IDL> s = string(white_f)
IDL> help,s
S STRING = Array[3, 100]

may be you want to give a format too, e.g.

s = string(white_f, format='(G5.2)')

cheers
Reimar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: "stack plot" function from ENVI in IDL?
Next Topic: double click in dialogs doesn't work

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

Current Time: Wed Oct 08 15:12:34 PDT 2025

Total time taken to generate the page: 0.00585 seconds