3
$\begingroup$

Solved in Mathematica v10.3


This first sample code works as expected:

es = EventSeries@Quantity[RandomReal[1, {250}], "Meters"]
es["Values"] // Head
TimeSeriesInsert[es, {{1000, Quantity[RandomReal[], "Meters"]}}]
TimeSeries@es
UnitConvert@es["Values"] // Head

Mathematica graphics

This second sample doesn't (Windows 8.1 x64, Mathematica 10.1):

es = EventSeries@Quantity[RandomReal[1, {500}], "Meters"]
es["Values"]
TimeSeriesInsert[es, {{1000, Quantity[RandomReal[], "Meters"]}}]
TimeSeries@es
UnitConvert@es["Values"]

Mathematica graphics

Problems:

  1. As already stated in another question QuantityArray is not displayed as of documentation.
  2. TimeSeriesInsert returns unevaluated.
  3. EventSeries is not converted to a TimeSeries.
  4. UnitConvert doesn't convert the QuantityArray to "SIBase"

The problems appear related to the fact that, over a Length of about 250 elements, the values are internally stored as the new QuantityArray expression, and maybe this is not yet supported by TimeSeriesInsert and other functions.

Any general workaround?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.