In order to concatenate two matrices "A" and "B" in MATLAB, we can use the 'vertcat' and 'horzcat' functions.
Here is an example of how to concatenate two matrices horizontally:
main.m81 chars4 lines
And here is an example of how to concatenate two matrices vertically:
main.m81 chars4 lines
Note that in both cases, the matrices must have the same number of rows or columns (depending on whether you are performing a horizontal or vertical concatenation).
gistlibby LogSnag