MatchArrays
This function "matches" two one-dimensional arrays together. The result is a 2-column matrix, where each row of the matrix contains the original elements of each array. If the arrays do not match each other at a certain index, then in the resulting matrix the array not containing that value will contain a NaN at that row. Each one-dimensional array should be sorted before passing it to this function.
For example, the input arrays [1 2 3 3 3 4 5] and [1 2 3 5 6 7] will be matched to look as follows: [1 2 3 3 3 4 5 nan nan; 1 nan 3 3 nan nan 5 6 7].
Cite As
David (2026). MatchArrays (https://in.mathworks.com/matlabcentral/fileexchange/56501-matcharrays), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
