雨流计数法matlab程度源代码

雨流计数法matlab程度源代码

ID:39323232

大小:22.26 KB

页数:3页

时间:2019-06-30

雨流计数法matlab程度源代码_第1页
雨流计数法matlab程度源代码_第2页
雨流计数法matlab程度源代码_第3页
资源描述:

《雨流计数法matlab程度源代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、%RAINFLOWcyclecounting.%RAINFLOWcountingfunctionallowsyoutoextract%cyclefromrandomloading.%%SYNTAX%rf=RAINFLOW(ext)%rf=RAINFLOW(ext,dt)%rf=RAINFLOW(ext,extt)%%OUTPUT%rf-rainflowcycles:matrix3xnor5xndependendoninput,%rf(1,:)Cyclesamplitude,%rf(2,:)Cyclesmeanvalue

2、,%rf(3,:)Numberofcycles(0.5or1.0),%rf(4,:)Beginingtime(wheninputincludesdtorexttdata),%rf(5,:)Cycleperiod(wheninputincludesdtorexttdata),%%INPUT%ext-signalpoints,vectornx1,ONLYTURNINGPOINTS!,%dt-samplingtime,positivenumber,whentheturningpoints%spacedequally,%ext

3、t-signaltime,vectornx1,exacttimeofoccurrenceofturningpoints.%%%SeealsoSIG2EXT,RFHIST,RFMATRIX,RFPDF3D.%RAINFLOW%Copyright(c)1999-2002byAdamNieslony,%MEXfunction.functionrfdemo1(ext)%functionrfdemo1(ext)%%RFDEMO1showscyclesextractedfromsignal%usingrainflowalgorit

4、m.%%INPUT:ext-option,numberorvectorswithturning%pointsortimehistory.Defaultext=16.%%OUTPUT:noenable.%%SYNTAX:%>>rfdemo1%>>rfdemo1(10)%>>rfdemo1([23242516])%%ByAdamNies硂ny%Revised,10-Nov-2009%VisittheMATLABCentralFileExchangeforlatestversion.error(nargchk(0,2,nar

5、gin))ifnargin==0,%turningpointsfrom16randomnumbersext=sig2ext(randn(4));elseiflength(ext(:))==1,%turningpointsfromnrandomnumbersext=sig2ext(randn(1,ext));else%turningpointsfromvectorextext=sig2ext(ext);enda=rainflow(ext,1);[mn]=size(a);%ifn>100,%button=questdlg(

6、['Rainflowfound'num2str(sum(a(3,:)))'cycles!Doyouwanttocontinue?'],...%'ContinueOperation','Yes','No','No');%ifstrcmp(button,'No')%error('Functionabortedbyuser.')%end%endcol='ymcrgb';plot(0:length(ext)-1,ext,'k.:')holdonwyk=0:0.05:1;forc=1:n,colnr=rem(c-1,6)+1;n

7、r1=round(a(4,c)+1);nr2=round(a(4,c)+1+a(5,c)*a(3,c));ifa(3,c)==1.0,ifext(nr1)

8、(wyk.*a(5,c)+a(4,c),cos(wyk.*2*pi)*a(1,c)+a(2,c),col(colnr))text(a(4,c),a(2,c)+a(1,c),[int2str(c)'.Cycle,down'],...'Color',col(colnr),'VerticalAlignment','bottom')end

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。