Dividing matrices of different dimensions
조회 수: 8 (최근 30일)
이전 댓글 표시
Hello,
I have one image matrix A, 512 x 512, and I have another matrix, B 8x8,
I want to transform matrix B, 8x8 matrix, into a 512x512 matrix by repeating the values over and over.
How can I do this?
Alternatively, how can I divide every 8x8 section of matrix A by matrix B ?
Thank you
댓글 수: 0
채택된 답변
Chunru
2022년 5월 11일
B = reshape(1:64, 8, 8); % generate B matrix
A = repmat(B, [32 32]); % repeating 32x32
imagesc(A)
댓글 수: 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!