It was recently noted that the random number generator, RNG, is not properly seeded in a group of “reaching task…” sample tasks.

The following sample tasks have been updated:

  • reaching task
  • reaching task with force channel
  • reaching task with force channel and position control
  • reaching task with gaze tracking
  • reaching task with perturbation
  • reaching task with velocity fields

This issue only affects Stateflow Charts that use MATLAB as the Action Language. In the past, C was used as the Action Language and as such, the programmer would NOT have had to ever seed the random number generator (RNG). In fact, if they have continued using C as the Action Language (e.g. building their new tasks based on older tasks) then this would not be a problem. It is only if they start using MATLAB as the Action Language.

In a future update to our Custom Task Programming User Guide, we will advise that this behaviour is different when using MATLAB as the Action Language vs. C.  We will also include a check that RNG might need to be seeded.

Ref. CAPA-1011