필터 지우기
필터 지우기

Dividing matrices of different dimensions

조회 수: 8 (최근 30일)
Gucci
Gucci 2022년 5월 11일
답변: Chunru 2022년 5월 11일
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

채택된 답변

Chunru
Chunru 2022년 5월 11일
B = reshape(1:64, 8, 8); % generate B matrix
A = repmat(B, [32 32]); % repeating 32x32
imagesc(A)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by