Rain flow for MATLAB Here you can find the rain flow algorithm for cycle counting