How to create a struct with field name numeric.

조회 수: 14 (최근 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 CenterFile Exchange에서 Structures에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by