What's the best plot for load spectrums?

Hey everybody!
I want to plot a typical load spectrum for reliability purpose. In this example I have 20 different load classes of a temperature load.
Since load spectrums usually have rectangular "steps" I tried the stairs-plot but I only managed the following plot:
It looks quite alright, but unfortunatly the plot lines in the 20th class should go horizontaly all the way to the y-axis.
My Code looks like this:
stairs(az(end:-1:1),1:x, 'color', 'k')
ylim([1 x+1])
grid on
set(gca, 'XScale', 'log')
hold on %I'm plotting in a for-loop
xlabel('Time [h]')
ylabel('Temperature Classes [-]')
title('Load Collective ')
x: Amount of classes
az: array of hours
Data:
x= 1:20;
az= [265,578,983,1479,2060,2728,3440,4175,4842,5446,6029,6597,7112,7579,7960,8270,8510,8665,8738,8759];
I counted 'az' backwards so that the 20th element of 'az' is connected to the class 20.
Does anyone have experience in plotting load spectrums of rainflow or dwell time data? Or does someone have an improvement of my code?
Your help is much appreciated, thank you!

댓글 수: 3

Mathieu NOE
Mathieu NOE 2022년 4월 19일
hello
maybe it would be usefull to share some data as well
tx
Yannick Braun
Yannick Braun 2022년 4월 19일
yes of course, I'll edit the question.
well , I prefered to flip x instead of az
and I think the plot is now ok
x= 20:-1:1;
az= [265,578,983,1479,2060,2728,3440,4175,4842,5446,6029,6597,7112,7579,7960,8270,8510,8665,8738,8759];
% stairs(az(end:-1:1),x, 'color', 'k','linewidth',5)
stairs(az,x, 'color', 'k','linewidth',5)
grid on
set(gca, 'XScale', 'log')
hold on %I'm plotting in a for-loop
xlabel('Time [h]')
ylabel('Temperature Classes [-]')
title('Load Collective ')

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Vibration Analysis에 대해 자세히 알아보기

제품

릴리스

R2021b

질문:

2022년 4월 18일

댓글:

2022년 4월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by