horzcat
Horizontal concatenation ([A, B]).
Syntax
Section titled “Syntax”C = horzcat(A, B)C = horzcat(A, B, ...)Description
Section titled “Description”Concatenates arrays horizontally — equivalent to [A, B] syntax. All inputs must have the same number of rows (or the same size in every dimension other than 2).
Examples
Section titled “Examples”horzcat([1; 2], [3; 4]) % [1 3; 2 4]horzcat(eye(2), zeros(2)) % 2×4