Borrar filtros
Borrar filtros

Is there easier way to assign structure data

1 visualización (últimos 30 días)
xianjie Zhou
xianjie Zhou el 13 de Oct. de 2014
Editada: Adam el 13 de Oct. de 2014
I feel there was a way to assign structure data without repeatedly refer the parents' name. For example: A structure: Struct1.A Struct1.B Struct1.C
Is there a way to assign value like following then we don't need to type struct1 repeatedly.
struct1 { .A=1 .B=2 .C=3 }

Respuesta aceptada

Adam
Adam el 13 de Oct. de 2014
Editada: Adam el 13 de Oct. de 2014
struct1 = struct( 'A', 1, 'B', 2, 'C', 3 );

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by