How can I find the maximum values in each range of a list in Mathematica?
问题 I can do this in MATLAB easily but I'm trying to do it Mathematica. I have a 27000 element (15 minutes*30 measurements per second) list of wind speed values. I want to find the max value in each 2700 element (90 second) range and output it to a vector. Here is the MATLAB code: N = length(AlongWS); SegTime = 90; NSeg = (N/30)/90; Max90 = zeros(NSeg,1); Incr = N/NSeg; for i = 1:NSeg Max90(i,1) = max(AlongWS((i-1)*Incr+1:(i*Incr),1)); end Here is what I've typed in Mathematica: N = Length