필터 지우기
필터 지우기

Average Values in a matrix

조회 수: 2 (최근 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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by