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!