How to solve the the parameter 'SampleTime' must be a real double scalar (period) or a real double vector of length 2 (period, offset).
16 次查看(过去 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
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
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".
0 个评论
Walter Roberson
2022-7-23
移动:Joel Van Sickel
2023-4-27
specify double(Ts) as the Sample Time in the block?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Custom Training Loops 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!