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

Home » Public Forums » archive » Array -Time
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: Array -Time [message #91973 is a reply to message #91972] Thu, 24 September 2015 05:34 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Thursday, September 24, 2015 at 2:16:22 PM UTC+2, Joyrles Fernandes wrote:
> I have:
> HH FLOAT = Array[1, 859]
> MM FLOAT = Array[1, 859]
>
> how Do create a only array with times value,e.g time=[1,859], with datas in array hh:mm. After I need to create a plot with day of year in funtion of time. Help me please.

My first question should be: what have you tried so far and what didn't work?

But whatever, I don't have my IDL open at the moment and I don't think it's necessary. So how about multiplying HH by 60 and summing that to MM? That would look like(*):
time = HH*60.0+MM
And time would have units of minutes(**).

Apart from that, depending on what you do, it might be convenient to make HH and MM 1d-arrays:
time = reform(HH)*60.0+reform(MM)

As far as your second question is concerned, I don't understand what "plot with day of year in function of time" means. Plotting this would result in a line. There are 24 h in a day and the equation would be day = 24.0*60.0*time.

Cheers,
Helder

(*) if you want to have time in hours instead of minutes, then use time = HH + MM/60.0.
(**) depending on your scientific field, minutes are generally not the unit to use. I would go for seconds, but astronomers might go for years or whatever else. But seconds would be my choice, so you would have to multiply everything by 60.0
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem with idl program
Next Topic: Covariance Matrix

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

Current Time: Fri Oct 10 01:33:24 PDT 2025

Total time taken to generate the page: 0.87777 seconds