opt = simOptions('AddNoise',true,'NoiseData',e);
Turns out I was looking at the wrong documentation. There are at least three different versions of the sim function and I was reading the documentation for the wrong one:
- simOut = sim(model) from Simulink
- sim(MPCobj,T,r) from the MPC toolbox
- y = sim(sys,udata) from the system identification toolbox (this is the one I am using in this question)
Footnote:
When using NoiseData with a SISO model, I realised that I have to set the model's NoiseVariance to 1 if the data in e is already adjusted to the variance of the noise signal. In other words:
sys = idpoly(A,B,C,D,1,1,1,'IODelay',d)