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
converting strings to float [message #88749] Fri, 13 June 2014 03:38 Go to previous message
Krishnakumar M.A is currently offline  Krishnakumar M.A
Messages: 19
Registered: March 2013
Junior Member
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
[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 14:21:47 PDT 2025

Total time taken to generate the page: 0.00392 seconds