Adding array to the end of another array

70 views (last 30 days)
Kunju Thimas
Kunju Thimas on 20 Apr 2022
Edited: Bruno Luong on 20 Apr 2022
I want to insert a array elements to the end of another array. for example
a=[ 1 2 3 4] and b =[ 5 6 7 8], so i need to insert the 'b' elements to the end of array of 'a'. so the output would be a=[1 2 3 4 5 6 7 8]
please help me with a function that can do this

Answers (1)

Bruno Luong
Bruno Luong on 20 Apr 2022
Edited: Bruno Luong on 20 Apr 2022
a=[ 1 2 3 4]; b=[ 5 6 7 8];
a = [a b]
a = 1×8
1 2 3 4 5 6 7 8

Categories

Find more on Operators and Elementary Operations 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!