how to combine matrices
조회 수: 1 (최근 30일)
이전 댓글 표시
I have two matrices: A & B ... I want to combine them so that every element will be near the other one's corresponding element. For example something like C matrix.
A=[1,2;3,4]
B=[5,6;7,8]
C=[15,26; 37, 48]
댓글 수: 3
Walter Roberson
2020년 1월 23일
Note that if you have negative entries then you will need to define what the results are expected to be.
채택된 답변
Walter Roberson
2020년 1월 23일
A*10+B
댓글 수: 6
Walter Roberson
2020년 1월 23일
That is not possible in MATLAB unless you are willing to use cell arrays C{1,2} = [-2 -6]
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!