Average Values in a matrix

1 回表示 (過去 30 日間)
Philip Hoskinson
Philip Hoskinson 2016 年 4 月 29 日
回答済み: Azzi Abdelmalek 2016 年 4 月 29 日
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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by