There are two issues with the code in the question: The first, as the error message tells us, is a problem with the syntax for TimeObject
: It should be TimeObject[{h,m,s}]
, not TimeObject[h,m,s]
(note the additional list around the arguments). The second issue is that TimeObject[…]
is not a valid increment, for the same reason as you can't add two TimeObject
s:
TimeObject[{00, 00, 00}] + TimeObject[{00, 10, 00}]
(* TimeObject[{0, 0, 0.}] + TimeObject[{0, 10, 0.}] *)
(It simply does not really make sense to say "add the time 13:00 to the time 11:00")
What we can do is add a quantity, e.g. Quantity[10, "min"]
:
timeList = Range[TimeObject[{00, 00, 00}], TimeObject[{23, 50, 00}], Quantity[10, "min"]];
constantList = ConstantArray[239, Length[timeList]];
res = Transpose[{timeList, constantList}]
(* long output… *)