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

Home » Public Forums » archive » converting strings to float
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: converting strings to float [message #88750 is a reply to message #88749] Fri, 13 June 2014 06:11 Go to previous messageGo to previous message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Friday, June 13, 2014 6:38:35 AM UTC-4, Krishnakumar M.A wrote:
> Hi All,
>
>
>
> I have a huge data file of two columns and a '# header' line in between. I used grep in idl to remove the '# lines'. The resulting output is written as a string, which is actually of 2 columns. I only require the second column for doing a surface plot. 1st column is just integer numbers. As i split the string by giving
>
>
>
> h=strmid(b,3,10)
>
>
>
> It will give me the second column but, rows from 0-9 will have huge -ve values. If I do the same with h=strmid(b,2,10), columns >=100 will give junk values. I'm kind of stuck with this.
>
>
>
> Is there a better way to split the string and copy to a fltarr than defining the position to read from, as like one can do in C, Fortran etc?
>
>
>
> Thanks,
>
> Krishnakumar

Have you considered the READ_ASCII function from the standard IDL library?

All the best,

David
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error while creating video in IDL
Next Topic: Program caused arithmetic error: Floating underflow

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

Current Time: Wed Oct 08 17:58:41 PDT 2025

Total time taken to generate the page: 0.00413 seconds