Rainflow Count (for Wind Turbine Calculations)

This is an efficient version of the rainflow counting algorithm that is admissible for wind turbine calculations.
398 Downloads
Updated 20 Feb 2021

View License

There is already a rainflow counting algorithm hosted on the file exchange, but it is written according to the ASTM standard and so results in half cycles.

This version of the rainflow counting algorithm shifts the time history to the largest point so it does not count half cycles, and is therefore admissible for wind turbine calculations according to the design guidelines. It is checked here against the rainflow count in DNV-GL's Bladed software.

It does not need the signal processing toolbox.

Edit - I have removed the .mex file at the request of MathWorks. you can recompile by typing 'mex rainflow.c' at the command line after installing a compiler (you can get one by searching 'MATLAB Support for MinGW-w64 C/C++ Compiler' in the MatLab app store

I hope this helps you!

Cite As

Peter Greaves (2026). Rainflow Count (for Wind Turbine Calculations) (https://www.mathworks.com/matlabcentral/fileexchange/81588-rainflow-count-for-wind-turbine-calculations), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.3

I have removed the .mex file at the request of MathWorks. you can recompile by typing 'mex rainflow.c' at the command line after installing a compiler (you can get one by searching 'MATLAB Support for MinGW-w64 C/C++ Compiler' in the MatLab app store