필터 지우기
필터 지우기

Create loop to extract mean of every 100 values

조회 수: 3 (최근 30일)
Edward Keavney
Edward Keavney 2022년 2월 3일
답변: David Hill 2022년 2월 3일
Hi,
I have an array, 24000 X 31.
Is there a way of writing a for loop that can take every row of the array to create 31 rows each with 24000 values and then take the mean average of every 100 values in each row. The result should hopefully be 31 separate arrays each with 240 values.
Thanks in advance, Ed.

답변 (1개)

David Hill
David Hill 2022년 2월 3일
newMatrix=reshape(mean(reshape(yourMatrix,100,[])),240,[]);%columns are each array

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by