How to solve the the parameter 'SampleTime' must be a real double scalar (period) or a real double vector of length 2 (period, offset).
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
困
el 30 de Jul. de 2024
Movida: Fangjun Jiang
el 30 de Jul. de 2024
I still came across this problem, Anyone knows how to fix it?
Fangjun Jiang
el 30 de Jul. de 2024
In this particular case, class(Ts) being 'single' was the root cause. The solution was to specify the sample time as 'double(Ts)'.
Respuestas (2)
Fangjun Jiang
el 22 de Jul. de 2022
Editada: Fangjun Jiang
el 28 de Abr. de 2023
This is the cause and it shocked me.
The "Ts" is currently of data type "single". Change it to be "double".
0 comentarios
Walter Roberson
el 23 de Jul. de 2022
Movida: Joel Van Sickel
el 27 de Abr. de 2023
specify double(Ts) as the Sample Time in the block?
0 comentarios
Ver también
Categorías
Más información sobre Custom Training Loops en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!