The first line gets a single sample path for an M/M/1 queue for time between 0 and 100. No problem, I can plot it, etc.

td = RandomFunction[QueueingProcess[9, 10], {0, 100}, 1];

Next, I want to look at the sample path of the process between time 10 and 50, so I do

subset = td["Part", 1, {10, 50}];

and MMA crashes on me. Ver on windows 7 64 bit.

Any suggestions?

  • 1
    $\begingroup$ try td["Part", 1, {10, 50, 1}] $\endgroup$ Commented Apr 8, 2013 at 15:42
  • $\begingroup$ Thanks for that suggestion, it does stop it from crashing, but then I only get the subset at the 1 time unit resolution. I really want it at at all points of change. $\endgroup$
    – PeterR
    Commented Apr 8, 2013 at 15:53

1 Answer 1


This is clearly a bug in part extraction for TemporalData. You can work around it by giving your times explicitly.

subset = td["Part", 1, {Cases[td["PathTimes"], x_ /; 10 <= x <= 50]}]

I have a feeling this is more in the spirit of what you want here anyway.

The "Part" property resamples the data so that it is uniformly spaced if you give {tmin, tmax, dt}. You omit the dt so it has to be inferred. In your case it should be trying to use the smallest time step in your data. This will result in a very large data object in this case because the smallest step is incredibly small compared to the time range you want.


It is additionally worth mentioning that "Part" uses the "PathFunctions" to build the subset. When you just want a window it can be unnecessarily expensive for continuous time process data. It is trivial to get what you want from the data itself and avoid building "PathFunctions".

Cases[td["Path", 1], {t_/; 10<=t<=50, _}]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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