code is too difficult to understand

1 view (last 30 days)
Maaz Rao
Maaz Rao on 13 Feb 2019
Answered: Guillaume on 13 Feb 2019
i have attached a file of the rainflow code can anybody comment this code i cannot understand it from 15 line onward
  4 Comments
Maaz Rao
Maaz Rao on 13 Feb 2019
actually i am a beginner
Maaz Rao
Maaz Rao on 13 Feb 2019
histogram('BinEdges',edges','BinCounts',sum(hist,2))
this line as well
Really looking forward to thank you

Sign in to comment.

Answers (1)

Guillaume
Guillaume on 13 Feb 2019
I'm not sure what you're looking for here. We're not going to teach you matlab, so perhaps you should grab a book and/or read some tutorial (e.g. Getting Started).
[c ,hist ,edges ,rmm ,idx] = rainflow(Y,fs);
what does this line does?
Assign the output of rainflow (called with arguments Y and fs) to the variables c, hist, edges, rmm and idx. The meaning of these outputs is documented.
histogram('BinEdges',edges','BinCounts',sum(hist,2))
plots the histogram of the sum of hist across the columns, using edges as the x-axis. histogram is documented with plenty of examples.

Categories

Find more on Vibration Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!