In order to see the code of a built in function you need to be hired by Mathworks or else have several billion dollars to buy the entire company .
The rainflow you found needs Signal Processing Toolbox r2017b or later.
If you look in the file Exchange there are at least two significant rainflow implementations .
Best Answer