Mean of 1st and 2nd, 3rd and 4th, 5th and 6th elements and so on

조회 수: 4 (최근 30일)
Joydeb Saha
Joydeb Saha 2021년 7월 13일
답변: Matt J 2021년 7월 13일
I have a 180x1 matrix. I want the mean of 1st and 2nd, 3rd and 4th, 5th and 6th elements like this. The new matrix then have 90 elements. how to do it?

채택된 답변

Matt J
Matt J 2021년 7월 13일
mean(reshape(yourMatrix,2,[]))

추가 답변 (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