How can I specify the width of Bin Edges when calculating the rainflow cycle counts matrix 'c = rainflow(x)'
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear Madam/Sir,
How can I specify the width of Bin Edges when calculating the rainflow cycle counts matrix 'c = rainflow(x)' ?
After computing the cycle counts for the data, using the command: [c,hist,edges,rmm,idx] = rainflow(Y) , I plot a histogram of cycle counts as a function of stress range, using the command: histogram('BinEdges',edges','BinCounts',sum(hist,2)) , as indicated in the example of the Matlab Documentation: https://ch.mathworks.com/help/signal/ref/rainflow.html#d120e139233
It seems that the 'Bin Edges' are assigned an arbitrary width value. Instead, I would like to assign a specific width value to the Bin Edges, while ploting the histogram of the cycle counts, resulting from the cycle counts matrix 'rainflow(x)'.
Could you please help me, how can I specify the width of Bin Edges when calculating the rainflow cycle counts matrix 'c = rainflow(x)' ?
Thank you very much in advance for your help
Best regards,
Geri
5 Kommentare
Sandro Günter
am 10 Aug. 2022
Bearbeitet: Sandro Günter
am 10 Aug. 2022
However, it counts the half cycles as full ones.
Another way is to change the code of the rainflow function itself as suggested here: https://stackoverflow.com/questions/52513809/reduce-bin-size-for-matlab-rainflow-counting
Sandro Günter
am 10 Aug. 2022
Bearbeitet: Sandro Günter
am 11 Aug. 2022
In order to count the half cycles correctly, you can add the following code:
index = find(count(:,1)==0.5); % find half cycles
N = N - 0.5 * histcounts(count(index,2),my_edges); % subtract half cycles
Antworten (0)
Siehe auch
Kategorien
Mehr zu Vibration Analysis finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!