Average Values in a matrix

1 次查看(过去 30 天)
I have a 100X225 matrix- I want to average [4,4] (or other) chunks of the matrix, and place that value in a new matrix: of a smaller dimension -> 100/4,225/4 etc
I can't seem to get the looping right.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2016-4-29
a=rand(100,225)
out=blockproc(a,[4 4],@(x) mean(mean(x.data)))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by