How to create a struct with field name numeric.

42 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by