Question: Max/Min of a rectangular function

Hey there,
i have a table of points that describe a rectangular function and i am trying to calculate the middle of the maximum or minimum (depending on the function) of this datacloud. my first attempt was to spline the data and then use the minimize command, however, i am not sure if the minimize command gives me the right result because it depends on my interval length. the second attempt was to calculate the derivative of the spline. but how do i get then the exact middlepoint? or is there an easier way to obtain the middle of the max/min? also for a function like you can see in the pic?

thanks for your time and help!

Please Wait...