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

Home » Public Forums » archive » extract numbers from string
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: extract numbers from string [message #44582 is a reply to message #44518] Wed, 22 June 2005 05:18 Go to previous messageGo to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Try this: nx=long(strmid(firstline,10,4)). You may have to adjust the
position and length (10 & 4) depending on your range of variables.


"Tobi" <tbeetz@yahoo.com> wrote in message
news:1119387544.336298.199520@f14g2000cwb.googlegroups.com.. .
> i have a data file with a header that has several lines, which i read
> with
>
> readf,1,firstline
> readf,1,secondline
> ....
>
> firstline is a string that looks like
> xpixels = 1024
>
> i am trying to convert this to a variable called nx which has the value
> 1024.
>
> is there a clean and easy way to do this?
>
> Thanks!
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Inverse 3D FFT
Next Topic: Re: Inverse 3D FFT

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

Current Time: Wed Dec 03 00:43:22 PST 2025

Total time taken to generate the page: 0.00216 seconds