簡體   English   中英

調用 Simulink 模型時的 Matlab 腳本“采樣時間段”錯誤

[英]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”采樣時間設置為繼承 0.1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM