How to solve the the parameter 'SampleTime' must be a real double scalar (period) or a real double vector of length 2 (period, offset).

조회 수: 19 (최근 30일)
the parameter 'SampleTime' must be a real double scalar (period) or a real double vector of length 2 (period, offset); where period, offset must be finite and non-negative and offset must be less than period.
  댓글 수: 10
困
2024년 7월 30일
이동: Fangjun Jiang 2024년 7월 30일
I still came across this problem, Anyone knows how to fix it?
Fangjun Jiang
Fangjun Jiang 2024년 7월 30일
In this particular case, class(Ts) being 'single' was the root cause. The solution was to specify the sample time as 'double(Ts)'.

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

답변 (2개)

Fangjun Jiang
Fangjun Jiang 2022년 7월 22일
편집: Fangjun Jiang 2023년 4월 28일
This is the cause and it shocked me.
The "Ts" is currently of data type "single". Change it to be "double".

Walter Roberson
Walter Roberson 2022년 7월 23일
이동: Joel Van Sickel 2023년 4월 27일
specify double(Ts) as the Sample Time in the block?

카테고리

Help CenterFile Exchange에서 Custom Training Loops에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by