Home > wafo > papers > wafodemo > wafofig9.m

# wafofig9

## PURPOSE

Intensity of rainflow cycles computed from St

wafofig9

## DESCRIPTION

```  WAFOFIG9  Intensity of rainflow cycles computed from St
through Markov approximation, compared with the
cycles found in the simulation.```

## CROSS-REFERENCE INFORMATION

This function calls:
 ccplot Plots a cycle count as a point process in the plane. cocc Plots cycles as points together with isolines of a cycle matrix. dat2tp Extracts turning points from data, mctp2rfm Calculates the rainflow matrix for a MCTP. pdfplot Plot contents of pdf structures qlevels Calculates quantile levels which encloses P% of PDF rindoptset Create or alter RIND OPTIONS structure. spec2mmtpdf Calculates joint density of Maximum, minimum and period. tp2rfc Finds the rainflow cycles from the sequence of turning points. wafostamp Prints a caption "made by WAFO" in current figure. clear Clear variables and functions from memory. hold Hold current graph.
This function is called by:

## SOURCE CODE

```001 function wafofig9
002 % WAFOFIG9  Intensity of rainflow cycles computed from St
003 %           through Markov approximation, compared with the
004 %           cycles found in the simulation.
005 %
006
007 global  WAFOFIGNUM
008
009 if isempty(WAFOFIGNUM)
010   disp('You must start wafodemo in order to run this script')
011   clear global WAFOFIGNUM
012   return
013 end
014
015 % Use the speed and nit as for the North Sea data
016 global St fmm xt NNp Nnit Nspeed
017
018 paramu = [-6 6 20];
019 % Only need to calculate Globals which is not empty
020 % Poseidon / Japan Sea data
021 if isempty(fmm)
022   disp('This takes several  minutes to finish => several hours ... ')
023   disp('depending on input arguments and your computer')
024   % Calculate the theoretical distribution
025   if Nnit<0
026     opt = rindoptset('method',abs(Nnit),'speed',Nspeed);
027   else
028     opt = rindoptset('method',0,'nit',(Nnit),'speed',Nspeed);
029   end
030   fmm = spec2mmtpdf(St,0,'mm',[0 7 NNp], paramu,opt);
031 end
032 f=fmm;
033
034 f.f= mctp2rfm({fmm.f , []});
035 f.cl=qlevels(f.f);
036 tp = dat2tp(xt);
037 rfc = tp2rfc(tp);
038 if 0,
039   cocc(paramu,rfc,f.f)
040 else
041   ccplot(fliplr(rfc));hold on
042   pdfplot(f,'k-'),  hold off
043 end
044 wafostamp('Figure 9','(NR)')
045
046 return
047```

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group

Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003