필터 지우기
필터 지우기

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

조회 수: 5 (최근 30일)
Nafalai
Nafalai 2021년 10월 15일
댓글: C B 2021년 10월 16일
Hello,
I am writing a Matlab script to call my Simulink model :
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)
But I get the following error:
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.
Does anyone know how to solve it? I tried adding the line
T_s= int64(T_s)
But I have the same issue...
Does anybody know how to solve this?
Thank you !

채택된 답변

C B
C B 2021년 10월 15일
Because 'test_lau/INES0' this block sample time (0.01) is lower than model sample time.
It sould be multiple of the fixed step size (0.1) specified for model.
there are 2 option
1)set model sample time as 0.01
2)set 'test_lau/INES0' sample time as inherit ot 0.1
  댓글 수: 2
Nafalai
Nafalai 2021년 10월 15일
That solved it, thanks a lot!
C B
C B 2021년 10월 16일
@Lau Del Happy to hear it solved your issue.
Please click on "Accept this Answer" if it fullfilled your requirement.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2014b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by