To concatenate matrices a
and b
in MATLAB, you can use the vertcat
or horzcat
functions depending on whether you want to concatenate them vertically or horizontally.
To concatenate them vertically, use vertcat
:
24 chars2 lines
To concatenate them horizontally, use horzcat
:
24 chars2 lines
Note that the number of rows in matrices a
and b
must be the same for horizontal concatenation, and the number of columns in matrices a
and b
must be the same for vertical concatenation.
gistlibby LogSnag