0

I am using matlab and trying to take struct arrays, and add them together to make a "super-struct array". Here are my two struct arrays:

>> ion_seed

ion_seed = 

285x1 struct array with fields:
    Header
    Sequence

>> lig_seed

lig_seed = 

44x1 struct array with fields:
    Header
    Sequence

my question is how do I add them together. I don't want to concatenate them, but rather insert one into the other.

so I end up with:

>>super_struct =

329x1 struct array with fields:
        Header
        Sequence

Is this even possible? I have only seen people concatenate struct arrays.

thanks very much.

1 Answer 1

1

You can just vertically concatenate them like any other array

super_struct = [ion_seed; lig_seed];
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.