How to create a struct with field name numeric.

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 Commenti

Sorry that was my fault, solution provided in the last post solved my problem.
Actually I want to know how can I get the value of a field corresponding to its value in a struct.
Thanks

Accedi per commentare.

Risposte (0)

Tag

Richiesto:

il 17 Apr 2020

Commentato:

il 17 Apr 2020

Community Treasure Hunt

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

Start Hunting!

Translated by