我正在撰寫一個 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)
但我有同樣的問題...
有誰知道如何解決這個問題?
謝謝 !
uj5u.com熱心網友回復:
有人為我解答!
因為“test_lau/INES0”這個塊采樣時間(0.01)低于模型采樣時間。它應該是為模型指定的固定步長 (0.1) 的倍數。有 2 個選項 1)將模型采樣時間設定為 0.01 2)將“test_lau/INES0”采樣時間設定為繼承 0.1
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/336446.html
上一篇:Matlab-實時繪制3D圖形
下一篇:Lumen-分頁和結果編輯
