Concatenate array from different main name struct

1 view (last 30 days)
I have
First.A =[ 1; 2; 3];
First.B =[ 10; 20; 30];
Second.A=[ 97; 98; 99];
Second.B=[970; 980; 990];
How I can obtain (mantaining the same order of elements)?
Result.A=[ 1; 2; 3; 97; 98; 99];
Result.B=[10; 20; 30; 970; 980; 990];

Accepted Answer

Birdman
Birdman on 23 Dec 2017
Result.A=[First.A;Second.A];
Result.B=[First.B;Second.B];

More Answers (0)

Categories

Find more on Structures in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!