Combine the Rows of 2 Matrices

Version 1.0.0.0 (527 Bytes) by Tom Baker
PAIRUP - Pairing up two matrices produces all ways rows from each can cat.
1.1K Downloads
Updated 30 Apr 2004

No License

"Pairing up" two matrices produces all ways rows from each can concatenate.

Note that a (r,s) matrix and a (t,u) matrix provides that pairup will produce a ( r*t, s+u ) matrix.

Note that this requires REPROWS.M which is also submitted to
the MATLAB Central File Exchange - Utilities - Miscellaneous.

Example: A pairup of a 2-by-3 matrix and a 3-by-2 matrix will produce a 6-by-5 matrix.

A is
a b c
d e f

B is
u v
w x
y z

pairup( A, B ) is
a b c u v
a b c w x
a b c y z
d e f u v
d e f w x
d e f y z

I used this to prepare case datas for parallel processing in survey.

Cite As

Tom Baker (2024). Combine the Rows of 2 Matrices (https://www.mathworks.com/matlabcentral/fileexchange/4816-combine-the-rows-of-2-matrices), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Just for fun in Help Center and MATLAB Answers
Acknowledgements

Inspired by: Reproduce Matrix Rows

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0