Dividing matrices of different dimensions
3 ビュー (過去 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!