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

Home » Public Forums » archive » Re: incremental time data file.....
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: incremental time data file..... [message #26330 is a reply to message #26328] Thu, 23 August 2001 05:58 Go to previous messageGo to previous message
Manish is currently offline  Manish
Messages: 20
Registered: April 2001
Junior Member
Pavel, thanks for the help, just one more thing!!

I've altered it to zero fill the hour and minute values, but how do I
introduce a zero to fill the values between 0 and 9 seconds in the same way?
Essentially, how do you zero fill a floating point value??

I trust this is an easy thing to fix, but I'd appreciate any help, being
only a mere novice....!

Cheers,
Manish

--


"Pavel A. Romashkin" <pavel.romashkin@noaa.gov> wrote in message
news:3B83E468.4E0D9DE4@noaa.gov...
> How about
>
> my_time = (findgen(24.*60.*60./1.04906)*1.04906)
> hh = fix(my_time / 3600L)
> mm = fix((my_time - hh*3600L)/60L)
> ss = my_time-hh*3600L-mm*60L
> out = transpose([[hh],[mm],[ss]])
> print, out[*, 82300:82310], format='(i2,":", i2,":", F8.5)'
>
> If you need exact zero-padded field width, play with string conversion
> and formatted output.
> Cheers,
> Pavel
>
> Manish wrote:
>>
>> Hi,
>> I've only started using IDL recently, and was wondering if anyone can
help
>> me out.
>> I need to produce a data file which steps through increments of time
>> (1.04906 s) for an entire day, i.e. to produce a file which looks like:
>>
>> 00:00:01.04906
>> 00:00:02.0992
>> ...
>> ...
>> 23:59:59....(whatever the last integer would be!)l
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DLM structures passing
Next Topic: Question/Bug on Transpose

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

Current Time: Fri Oct 10 23:59:18 PDT 2025

Total time taken to generate the page: 1.79388 seconds