雨流计数法matlab程度源代码.doc

雨流计数法matlab程度源代码.doc

ID:56833336

大小:19.50 KB

页数:3页

时间:2020-07-15

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

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

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,%rf(3,:)Numberofcycles(0.5o

2、r1.0),%rf(4,:)Beginingtime(wheninputincludesdtorexttdata),%rf(5,:)Cycleperiod(wheninputincludesdtorexttdata),%%INPUT%ext-signalpoints,vectornx1,ONLYTURNINGPOINTS!,%dt-samplingtime,positivenumber,whentheturningpoints%spacedequally,%extt-signaltime,vectornx1,exacttimeofoccurrenceofturningpoi

3、nts.%%%SeealsoSIG2EXT,RFHIST,RFMATRIX,RFPDF3D.%RAINFLOW%Copyright(c)1999-2002byAdamNieslony,%MEXfunction.functionrfdemo1(ext)%functionrfdemo1(ext)%%RFDEMO1showscyclesextractedfromsignal%usingrainflowalgoritm.%%INPUT:ext-option,numberorvectorswithturning%pointsortimehistory.Defaultext=16.%%

4、OUTPUT:noenable.%%SYNTAX:%>>rfdemo1%>>rfdemo1(10)%>>rfdemo1([23242516])%%ByAdamNies硂ny%Revised,10-Nov-2009%VisittheMATLABCentralFileExchangeforlatestversion.error(nargchk(0,2,nargin))ifnargin==0,%turningpointsfrom16randomnumbersext=sig2ext(randn(4));elseiflength(ext(:))==1,%turningpointsfr

5、omnrandomnumbersext=sig2ext(randn(1,ext));else%turningpointsfromvectorextext=sig2ext(ext);enda=rainflow(ext,1);[mn]=size(a);%ifn>100,%button=questdlg(['Rainflowfound'num2str(sum(a(3,:)))'cycles!Doyouwanttocontinue?'],...%'ContinueOperation','Yes','No','No');%ifstrcmp(button,'No')%error('Fu

6、nctionabortedbyuser.')%end%endcol='ymcrgb';plot(0:length(ext)-1,ext,'k.:')holdonwyk=0:0.05:1;forc=1:n,colnr=rem(c-1,6)+1;nr1=round(a(4,c)+1);nr2=round(a(4,c)+1+a(5,c)*a(3,c));ifa(3,c)==1.0,ifext(nr1)

7、a(2,c)-a(1,c),[int2str(c)'.Cycle,up'],...'Color',col(colnr),'VerticalAlignment','top')elseplot(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. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。