Why am I recieving a warning when importing a "struct" with a 2-D array using "Simulink.​importExte​rnalCTypes​"?

I am attempting to import a header file into Simulink in MATLAB R2022a using the following command:
>> Simulink.importExternalCTypes("test.h")
The header file defines a struct in C code, which contains a 2-D array member, as shown:
typedef struct myStruct{
float y;
float x[2][2];
}myStruct;
However, I receive the following warning: 
Warning: 'myStruct' from file 'C:<currentDirectory>\test.h' is not imported. It has a field whose type is unsupported in Simulink.
Why is the import not working as expected?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 1 月 11 日
N-dimensional arrays in structs were previously unsupported in MATLAB R2022a, so the warning is expected behavior.
Importing multidimensional arrays is supported in R2022b onwards, please update to this or a newer release to access the latest functionality.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStructures についてさらに検索

製品

リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by