Adding two different size matrices
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi all
I have a one matrice whos size is 100x50 let say
A=ones(100,50)
and I want to add it with its transpose
B=A+A';
but I am getting error of matrix dimensions.
Any help is appreciated..........
댓글 수: 0
채택된 답변
추가 답변 (1개)
Andrei Bobrov
2013년 5월 14일
A=ones(100,50);
A2 = zeros(max(A));
A2(1:numel(A)) = A;
B = A2 + A2';
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!