How to use mean2 and skip some rows?

조회 수: 2 (최근 30일)
Nuria Andreu
Nuria Andreu 2021년 11월 30일
댓글: Nuria Andreu 2021년 11월 30일
Hello! I have a matrix with dates from 1920's to 2020's. I want to get the means of my column #11. I used mean2 and it worked perfect but I do not want to include the means corresponding to years 1926 to 1929. How can I skip this dates and use mean2 for the entire matrix column?
Thank you!

채택된 답변

DGM
DGM 2021년 11월 30일
What's wrong with just
mymean = mean(yearly_data_matrix(5:end,11));
since you're extracting a vector, I don't see the need for mean2()
  댓글 수: 1
Nuria Andreu
Nuria Andreu 2021년 11월 30일
It worked perfectly, thank you! and thank you for letting me know about the vector

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by