Reputation: 449
I want to merge two arrays in Matlab like this
A = [1 2; 3 4] B = [5 6; 7 8] C = [1 5; 3 7; 2 6; 4 8]
Upvotes: 0
Views: 915
Reputation: 26069
use the : operator:
:
C = [A(:) B(:)]
Upvotes: 4