# MCrunch

**URL:** <https://forums.nlr.gov/t/mcrunch/1310>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [March 31, 2016, 4:04pm UTC](https://forums.nlr.gov/t/mcrunch/1310 "2016-03-31T16:04:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inaki.Sandua](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Inaki.Sandua](https://forums.nlr.gov/u/Inaki.Sandua)\
**Post date:** [March 31, 2016, 4:04pm UTC](https://forums.nlr.gov/t/mcrunch/1310/1 "2016-03-31T16:04:01Z")

</div>

Hello,

I am Iñaki Sandua and I am working with MCrunch. I am trying to perform the fatigue analysis of some files that I have created, but it is giving me some problems. I have solved most of them, but I do not know how to fix the last one. In MatLab it appears the following error when I turn the BinCycles flag to true:

Performing fatigue analysis.  
Performing fatigue analysis of aggregate data:  
TwrBsMyt: Identifying peaks. Finding cycles. Binning cycles.Attempted to access Bins(-168,1); index must be a positive integer or logical.

Error in CompFatigue/Rainflow (line 807)  
Bins(RInd,MInd) = Bins(RInd,MInd) + TimeFact\*Cycles(Cyc,4);

Error in CompFatigue (line 193)  
[Fatigue.Agg.RF(Ch).Cycles, Fatigue.Agg.RF(Ch).DEL, Fatigue.Agg.RF(Ch).Bins] = Rainflow( File, Ch, Range(Ch), TimeFact,  
Fatigue.ChanInfo(Ch).SNslopes );

Error in MCrunch (line 80)  
CompFatigue( SettingsFile );

I would be so grateful if you could help me solving this error.

Regards,

Iñaki
