How to calculate absolute mean across numerical array

1 Ansicht (letzte 30 Tage)
Tomaszzz
Tomaszzz am 7 Mär. 2022
Beantwortet: Matt J am 7 Mär. 2022
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.

Akzeptierte Antwort

Matt J
Matt J am 7 Mär. 2022
mean_array = mean( abs(P_acc_y), 2);

Weitere Antworten (1)

Matt J
Matt J am 7 Mär. 2022
mean_array = vecnorm(P_acc_y, 1, 2)/24;

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by