How to find the Union of two 2D arrays of different size
2 次查看(过去 30 天)
显示 更早的评论
I have two 2D arrays of different sizes: say A - 100X100 B- 150 X125 i need to get the union of these two arrays...
0 个评论
采纳的回答
Junaid
2012-5-1
in your given example, either dimension should be same, A and b should have same number of columns. I think you can make your 2-D matrix or row or column array.
A = A(:);
B = B(:);
then union function will take the union of A, B. You can convert both in 2-D matrix by reshape command.
and If you have to concatenate A, B then again both A, B should have same number of columns.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!