Why isn't it possible to index the "Data Store Read" block with a variable of data type uint32 ?

2 次查看(过去 30 天)
As explained in the documentation of the Simulink block "Data Store Read" (https://de.mathworks.com/help/simulink/slref/datastoreread.html) it is possible to use indexing to read parts of a data store memory block. The following data types for the index input variable are supported:
int8 | int16 | int32 | uint8 | uint16
Is there a reason, why the data type uint32 is not supported?

回答(1 个)

Shivam
Shivam 2023-11-29
Hello,
Based on the information provided, I have gathered that the supported data types for the index input variable to select corresponding data store subelements are limited to 'int8', 'int16', 'unit8', and 'uint16'. You are curious about why 'uint32' is not supported.
It is important to consider that the choice of index variable data type is closely linked to the size of the Data Store Memory. The extensive range of 'uint32', from 0 to 4,294,967,295, could potentially lead to overflow or out-of-bounds errors.
Although the explicit size of the Data Store Memory is not specified, this significantly large index variable might be a contributing factor.
I hope it helps.
  1 个评论
dh1024
dh1024 2023-11-29
Thank you for your response!
Allowed data types are:
Data Types: int8 | int16 | int32 | uint8 | uint16
The range from int32 is: -2,147,483,648 to 2,147,483,647
So since int32 is a valid indexing data type though, it dosen't make sense for me why uint32 shouldn't be allowed. But thank you anyways. Have a nice day!
David

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 String 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by