Finding the average by excluding some values

조회 수: 39 (최근 30일)
ganesh kumar patamsetti
ganesh kumar patamsetti 2019년 9월 11일
답변: Stephen23 2019년 9월 11일
Area= [ 1 2 3 4 5 1 1 1 1 12 2 3 4 5 121 145 190 500.............. ]
It has 500 values ranging from 1 to 1000
I need to exclude the values ranging from 1 to 10 and find the average (mean )of the other values.
Can anyone help
Thanks in advance

답변 (1개)

Stephen23
Stephen23 2019년 9월 11일
>> Area= [ 1 2 3 4 5 1 1 1 1 12 2 3 4 5 121 145 190 500];
>> mean(Area(Area>10))
ans = 193.6

카테고리

Help CenterFile Exchange에서 NaNs에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by