mean value of array between values
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi guys,
I need your help, I need to know a mean value of array between values (without max and min), for example:
a = [1 2 ; 3 4 ; 5 6]
max(A)=6
min(A)=1
Equation: (2 + 3 + 4 + 5)/4
I thought in something like:
( a(i)-max(a)-min(a) )/4
But that's wrong.
Please help me.
댓글 수: 0
채택된 답변
Bhaskar R
2019년 10월 31일
Yes, your thought is right
mean_value_ex = (sum(a(:))-(max(a(:))+min(a(:)))/ (numel(a)-2))
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!