I don't know why the answer to this question was deleted, but I hope someone else checks this question
How can I make the cycle range symmetric around zero in rainflow ?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi All
I am using
rainflow( x, 'ext')
but the cycle ranges are not symmetric around zero. How can I make matlab do that ?
This is what I get from RainFlow command :
![Histogram-X.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257170/Histogram-X.png)
As you see it seems like you are watching the graph from behind
instead , normally this is what I see as a histogram on internet you can see how the Cycle mean and Cycle average are swapped
![hh.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257171/hh.jpeg)
채택된 답변
Star Strider
2019년 12월 25일
After all that (and deleting my first Answer because it was not solving the problem), the solution appears to have turned out to be relatively simple.
This uses an example from the rainflow documentation (specifically, Cycle Counts of Timetable). Try it with your own data:
fs = 100;
t = seconds(0:1/fs:100-1/fs)';
x = randn(size(t));
TT = timetable(t,x);
figure
rainflow(TT) % Original
figure
rainflow(TT)
set(gca, 'View',[60 30]) % Rotated Using A Simple View Call To The Last Plotted Axes
producing this originally:
![1How can I make the cycle range symmetric around zero in rainflow (1) - 2019 12 25.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257184/1How%20can%20I%20make%20the%20cycle%20range%20symmetric%20around%20zero%20in%20rainflow%20(1)%20-%202019%2012%2025.png)
and after the rotation:
![1How can I make the cycle range symmetric around zero in rainflow (2) - 2019 12 25.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257185/1How%20can%20I%20make%20the%20cycle%20range%20symmetric%20around%20zero%20in%20rainflow%20(2)%20-%202019%2012%2025.png)
댓글 수: 2
Star Strider
2019년 12월 25일
As always, my pleasure!
I deleted my Answer so someone else could contribute, since my previous attempts were not successful. It turned out that I was just over-thinking this problem.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Vibration Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!