median

Dec 23, 2011 at 7:50pm

median

how would YOU effectively (for realtime applications) calculate the median of a list of numbers?

#60833
Dec 23, 2011 at 8:11pm

[zl median] ho ho ho :p

#219044
Dec 23, 2011 at 9:11pm

sounds good.

and errm … in max v4?
 
 
and i am not sure if that what i am doing since years is right: when the number of elements is even, what do i do:

1.) get the average of the two middle elements
or
2.) find the average of the whole list and choose one of the middle numbers accorign to where the average lies.
?

-110

#219045
Dec 23, 2011 at 10:21pm

option 1.

first, sort list.

then,
if list length is uneven, take middle element
if list length is even, take average of middle two elements.

#219046

You must be logged in to reply to this topic.