Simple question regarding sorting
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, If I have two column matrixes of size Nx1 and Mx1 and I want to marge them together to make a Yx1 Column, but sorted in order how would I do this? I would not want a repeate of a number also.
0 件のコメント
採用された回答
Wayne King
2012 年 6 月 28 日
編集済み: Wayne King
2012 年 6 月 28 日
X = randi(30,100,1);
Y = randi(30,50,1);
Z = unique([X ; Y]);
The result from unique() is sorted.
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Shifting and Sorting Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!