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

2 ビュー (過去 30 日間)
dh1024
dh1024 2022 年 1 月 10 日
コメント済み: dh1024 2023 年 11 月 29 日
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 Center および File ExchangeMulticore Processor Targets についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by