how to reduce the size of a matrix?
4 ビュー (過去 30 日間)
古いコメントを表示
Suppose I have 4 by 4 matrix or of any size and I want to make it a 2by2 matrix by taking the average of the sub matrixes.
0 件のコメント
採用された回答
Image Analyst
2022 年 6 月 12 日
m = randi(9, 4, 4) % Sample data.
sums = conv2(m, ones(2,2)/4, 'same');
means = sums(1:2:end, 1:2:end)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!