Posts: 82
Joined: 2007-06-21
Location: United States
Here is a solution which I have not tested:
Function CreateDateTimeWave(year, dayOfYear, timeOfDay, newWaveName)Wave year
Wave dayOfYear
Wave timeOfDay // 1200 represents noonString newWaveName // Name for new waveVariable numPoints = numpnts(year)// Assume all input waves have the same number of pointsMake/O/N=(numPoints)/D $newWaveNameWave w = $newWaveName// Create wave reference to new waveSetScale d, 0, 0, "dat", w // Tell Igor it is a date/time wave
w = date2secs(year, 0, 0)// Convert to Igor date/time format (seconds since 1/1/1904)
w += dayOfYear *60*60*24// Add seconds corresponding to day of year
w += (timeOfDay /100)*60*60// Add seconds corresponding to time of dayEnd
You can use the resulting wave as the X wave of an XY pair for graphing.
Joined: 2007-06-21
Location: United States
Here is a solution which I have not tested:
You can use the resulting wave as the X wave of an XY pair for graphing.
Joined: 2008-08-01
Location: United States
Thanks... I'll be trying this out tomorrow when I get to the office.