Matlab 脚本 "sample time period" 调用 Simulink 模型时出错

Matlab script "sample time period" error when calling Simulink model

我正在编写一个 Matlab 脚本来调用我的 Simulink 模型:

Constant10=43;
Constant11=43;
In1=[1,2,3];
In2=[4,5,6];
t_stop = 100;
T_s = t_stop/1000;
options = simset('solver', 'ode5', 'fixedstep', T_s);
sim('test_lau.slx',t_stop,options)

但我收到以下错误:

Error using test_call_model (line 18)
The sample time period (0.01) of 'test_lau/INES0' is not an integer multiple of the fixed step size (0.1) specified for model.

有人知道怎么解决吗?我尝试添加行 T_s= int64(T_s) 但是我有同样的问题...

有人知道怎么解决吗?

谢谢!

有人帮我解答了!

因为'test_lau/INES0'这个块采样时间(0.01)低于模型采样时间。 它应该是为模型指定的固定步长 (0.1) 的倍数。 有2个选项 1)设置模型采样时间为0.01 2)设置'test_lau/INES0'采样时间为inherit ot 0.1