Borrar filtros
Borrar filtros

Average Values in a matrix

2 visualizaciones (últimos 30 días)
Philip Hoskinson
Philip Hoskinson el 29 de Abr. de 2016
Respondida: Azzi Abdelmalek el 29 de Abr. de 2016
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.

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by