Hello, How would I take the mean value of a matrix and exclude only the one max value?
Thanks

 Akzeptierte Antwort

Robert Dylans
Robert Dylans am 9 Okt. 2015

0 Stimmen

x=[1,2,3;4,5,6;7,8,500];
mean_value=(sum(x(:))-max(x(:)))/(numel(x)-1);
For 1d vectors rather than a matrix, you can exclude the (:) portions.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by