mean value of array between values
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
G T
am 31 Okt. 2019
Beantwortet: Bhaskar R
am 31 Okt. 2019
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 Kommentare
Akzeptierte Antwort
Bhaskar R
am 31 Okt. 2019
Yes, your thought is right
mean_value_ex = (sum(a(:))-(max(a(:))+min(a(:)))/ (numel(a)-2))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!