MATLAB Function Reference    

Horizontal concatenation



C = horzcat(A1,A2,...) horizontally concatenates matrices A1, A2, and so on. All matrices in the argument list must have the same number of rows.

horzcat concatenates N-dimensional arrays along the second dimension. The first and remaining dimensions must match.

MATLAB calls C = horzcat(A1,A2,...) for the syntax C = [A1 A2 ...] when any of A1, A2, etc. is an object.


Create a 3-by-5 matrix, A, and a 3-by-3 matrix, B. Then horizontally concatenate A and B.

See Also

vertcat, cat

  home hsv2rgb