필터 지우기
필터 지우기

how to find the average of a table 366-by-6

조회 수: 2 (최근 30일)
Gurleen Bajwa
Gurleen Bajwa 2021년 11월 19일
답변: Peter Perkins 2021년 11월 23일
I've modified my table into a 366-by-6 and am trying to get the total average. So far, I have only gotten the average of each single file using A= varfun(@mean,x,'InputVariables',@isnumeric)

채택된 답변

Matt J
Matt J 2021년 11월 19일
편집: Matt J 2021년 11월 19일
Perhaps as follows,
mean(varfun(@mean,x,'InputVariables',@isnumeric,'OutputFormat','uniform'))
  댓글 수: 2
Gurleen Bajwa
Gurleen Bajwa 2021년 11월 19일
Thanks! It worked!
Matt J
Matt J 2021년 11월 19일
You're very welcome, but please Accept-click the answer to indicate so.

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

추가 답변 (1개)

Peter Perkins
Peter Perkins 2021년 11월 23일
Another possibility would be
mean(T{:,vartype("numeric")},"all")
But beware, the {} there will downcast mixed numeric types.

카테고리

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

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by