필터 지우기
필터 지우기

Average of rows based on oter column

조회 수: 6 (최근 30일)
YEMY
YEMY 2022년 6월 23일
답변: Image Analyst 2022년 6월 23일
Hello,
I have a very big dataframe with many columns, I am interested in making the average of a variable X only between 8am and 7pm (the hours column is introduced in the dataframe and expressed in military time (8am = 0800 or 800) and I have records every 30 minutes.
As an addition and if it is possible, I want to know the count of how many rows have been used to make the average for each day, as I have missing data and not all the 30 minutes observations are present.
Thank you.
  댓글 수: 1
dpb
dpb 2022년 6월 23일
Use a timetable and retime and/or groupsummary Read about grouping variables in general...

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

답변 (1개)

Image Analyst
Image Analyst 2022년 6월 23일
Try grpstats, groupsummary, or splitapply. You might also want to take a look at findgroups

카테고리

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

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by