The mean of a subset of data

2 次查看(过去 30 天)
Hello,
I have a vector of acceleration values, both positive and negative negative numbers.
How could I find the mean value of the values greater than 0 only? i.e. the mean positive acceleration?
Thank you

采纳的回答

José-Luis
José-Luis 2013-1-7
mean(your_data(your_data>0));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by