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 CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by