mean value of array between values
10 ビュー (過去 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!