# How to add elements to the end of an array?

868 views (last 30 days)
Angela Albrecht on 27 Oct 2016
Answered: Jessie Canaday on 24 Dec 2021
I have two arrays:
alpha = [ 1 2 3 4 5]; beta = [ 6 7 8 9 10 11 12];
I'd like to add beta to the end of alpha so they form gamma
gamma = [1 2 3 4 5 6 7 8 9 10 11 12];
How would I go about doing this?
Punnag Chatterjee on 2 Feb 2018
Thanks for this info.

John Wirzburger on 27 Oct 2016
gamma = [alpha beta];
James Tursa on 5 Feb 2018
@ Charles. This comment does not appear to be sufficiently related to the original Question. Suggest you delete this comment and open up a new Question about your specific problem.

### More Answers (2)

Mebin A Abraham on 14 Apr 2020
how can i add elements in an array..... suppose A=[ 1 2 3 4]....i want to get sum of the numbers..ie.1+2+3+4=10.........for that what is the function
##### 1 CommentShowHide None
Dinesh Brindavanam on 18 Apr 2020
B = sum(A)

Jessie Canaday on 24 Dec 2021
Math and joy is it for the enhancement for the citizens. Paths of the https://www.bestessaytips.com/term_papers.php are chanced for he goals. The field is issued for the top of the terms for the citizens.

### Community Treasure Hunt

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

Start Hunting!