How to create a struct with field name numeric.

13 ビュー (過去 30 日間)
Balkar Singh
Balkar Singh 2020 年 4 月 17 日
コメント済み: Balkar Singh 2020 年 4 月 17 日
s = struct('1',{'110000'},'2',{'110001'});
Error using struct
Invalid field name "1".
How I can create a struct which have field name numeric value like the above example but i got a error as shown.
Thanks in advance.
  3 件のコメント
Balkar Singh
Balkar Singh 2020 年 4 月 17 日
Sorry that was my fault, solution provided in the last post solved my problem.
Balkar Singh
Balkar Singh 2020 年 4 月 17 日
Actually I want to know how can I get the value of a field corresponding to its value in a struct.
Thanks

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by