If I have a function that accepts TemporalData objects, is there some mechanism whereby it can determine what kind of object it gets (TimeSeries vs. EventSeries)?


1 Answer 1

data = RandomReal[{-1, 1}, 10];
ts = TimeSeries[data, Automatic];
es = EventSeries[data, Automatic];

First/@{es, ts}

{EventSeries, TimeSeries}


eventSeriesQ = First@#===EventSeries &

eventSeriesQ/@{es, ts}

{True, False}


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.