Hello Sohrab,
When exporting a NARX network block to Simulink, the ‘gensim’ function can be used to adjust the sample time as needed. There are two ways to do this:
- By directly specifying the sample time by providing the network as the first input and the sample time as the second input.
gensim(net, 0.001);
- Using name-value pair to specify the sample time, especially when dealing with multiple inputs, as demonstrated in the example below.
[sysName,netName] = gensim(net,'SampleTime',0.001,'InputMode','Workspace',...
'OutputMode','Workspace','SolverMode','Discrete');
The following documentation can be referred to get more information on ‘gensim’ function: https://www.mathworks.com/help/releases/R2022b/deeplearning/ref/network.gensim.html .