Application of rainflow on random wave

 Accepted Answer

The Mathworks supplied rainflow routine is documented as expecting a vector of single or double .
The File Exchange contributions I pointed out to you were created before matlab added graph objects . They expect data not objects.

6 Comments

what is the differnce between the code provided by adam nielsony and the built in rainflow function
This appears to refer to https://www.mathworks.com/matlabcentral/fileexchange/3026-rainflow-counting-algorithm which is a contribution that uses C code to do the implementation, compared to https://www.mathworks.com/help/signal/ref/rainflow.html
Both claim to follow ASTM E1049-85 .
I do not know if there is any difference between them.
what do you mean by ysing the C code what does the other one uses?
The Adam Nielsony contribution has some MATLAB wrappers, but all of the real work is done in some C code that is called from MATLAB. You should cd to the directory you installed that software into and look at the files: you will see rainflow.c which is the implementing code in C.
If you look at Emanuele Pasaresi's version "Rainflow counting as per 1) ASTME and 2) Endo", then their rainflow_ASTME.m file is a translation of Adma Nielsony's code into MATLAB.
One difference I see is that Mathwork's rainflow can return a number of additional outputs that the other two cannot return. The actual cycle counting is done in a mex library (probably for performance.)
in help section it is written that the output rm of the rainflow function is as follows
%%%%%%%%%%%%
rm — Rainflow matrix
matrix
Rainflow matrix. The rows of rm correspond to cycle range, and the columns correspond to cycle mean
but when the histogram is plotted and the the sum of these rows correspond to counts of a specific range
CAN YOU PLEASE CLEAR THIS CONFUSION OF MINE I WOULD REALLY BE THANKFUL
I do not see any contradiction there. The rm matrix is a 2D histogram, so it makes sense that the sums along the rows or along the columns add up to the totals expected for that class. The bin locations are returned in the next two output arguments after rm.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!