matrix dividing
조회 수: 2 (최근 30일)
이전 댓글 표시
If I have a big matrix like this: A=ones(1,450000). How can I divide it in 300 equal parts (1, 1500) and multiple these 300 parts (arrays) with a matrix with dimensions B=(1,300)?
Thank you...
댓글 수: 0
답변 (1개)
Fangjun Jiang
2011년 11월 15일
A=ones(1,450000);
NewA=reshape(A,300,[]);
C=B*NewA;
댓글 수: 2
Fangjun Jiang
2011년 11월 15일
Use this example to understand the row and column
Assume B=magic(3)
B(:,1) is the first column of B, B(:,2) is the second column,...
B(1,:) is the first row of B, B(2,:) is the second row, ...
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!