Extracting field values from cell array of structures
Mostrar comentarios más antiguos
I have a cell array of structures. Each structure has the fields : Start, End, Id..
RP_Cell{1,1}.Start = [1 2 3; 4 6 4]
RP_Cell{1,1}.End= [11 7 33; 4 16 9]
RP_Cell{1,1}.Id= [23;-4]
RP_Cell{1,2}.Start = [1 -2 4]
RP_Cell{1,2}.End= [17 6 3]
RP_Cell{1,2}.Id= [5]
.
.
RP_Cell{2,1}.Start = [1 2 87; 4 23 1; 7 3 1]
RP_Cell{2,1}.End= [15 65 21; 35 1 6; 6 3 1]
RP_Cell{2,1}.Id= [9; 34; 56]
.
.
.
.
Now, I want to have the data in the fields separately - Start_List, End_List
Start_List{1,1} = [1 2 3; 4 6 4]
Start_List{1,2} = [1 -2 4]
.
.
Start_List{2,1} = [1 2 87; 4 23 1; 7 3 1]
.
End_List{1,1} = [11 7 33; 4 16 9]
End_List{1,2} = [17 6 3]
.
.
End_List{2,1} = [15 65 21; 35 1 6; 6 3 1]
.
How do I do this in the simplest way without using loops
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Structures en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!