How to calculate absolute mean across numerical array

2 ビュー (過去 30 日間)
Tomaszzz
Tomaszzz 2022 年 3 月 7 日
回答済み: Matt J 2022 年 3 月 7 日
Hi all,
I have an array of 100x24 double. I want to calculate absolute mean so the output is 100x1 double. Can you help please?
mean_array = mean((abs(P_acc_y, 2)));
gives me
Error using abs
Too many input arguments.

採用された回答

Matt J
Matt J 2022 年 3 月 7 日
mean_array = mean( abs(P_acc_y), 2);

その他の回答 (1 件)

Matt J
Matt J 2022 年 3 月 7 日
mean_array = vecnorm(P_acc_y, 1, 2)/24;

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by