Merge sorted arrays
Version 1.3.0.0 (8,37 KB) von
Bruno Luong
Given two already sorted arrays, the function combines them in an unique sorted array
Using this function avoids to call Matlab SORT(), which does unnecessary work since the two inputs is already sorted.
Mex implementation for speed.
'rows' option supported
Zitieren als
Bruno Luong (2025). Merge sorted arrays (https://www.mathworks.com/matlabcentral/fileexchange/28930-merge-sorted-arrays), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Erstellt mit
R2010b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und MATLAB Answers
Tags
Quellenangaben
Inspiriert: ChooseK
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
MergeSortedArrays/
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.3.0.0 | Fix bug of merge rows with empty array |
||
1.2.0.0 | Minor speed improvement |
||
1.1.0.0 | Optionally return the splitting locations of the inputs |
||
1.0.0.0 |