フィルターのクリア

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 Center および File ExchangeLogical についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by