Home > wafo > papers > wafodemo > wafofig10.m

# wafofig10

## PURPOSE

Intensity of trough-crest cycles computed from St

wafofig10

## DESCRIPTION

```  WAFOFIG10 Intensity of trough-crest 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. dat2tc Extracts troughs and crests from data. mctp2tc Frequencies of upcrossing troughs and crests using Markov chain of turning points. 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. tp2mm Calculates min2Max and Max2min cycles from a 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 wafofig10
002 % WAFOFIG10 Intensity of trough-crest 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 % TODO % Is not finished
015 global St fmm xt NNp Nnit Nspeed
016
017 paramu = [-6 6 20];
018 %
019 if isempty(fmm)
020   disp('This takes several  minutes to finish => several hours ... ')
021   disp('depending on input arguments and your computer')
022   % Calculate the theoretical distribution
023   if Nnit<0
024     opt = rindoptset('method',abs(Nnit),'speed',Nspeed);
025   else
026     opt = rindoptset('method',0,'nit',(Nnit),'speed',Nspeed);
027   end
028   fmm = spec2mmtpdf(St,0,'mm',[0 7 NNp], paramu,opt);
029 end
030 f=fmm;
031 if 1,
032   % WAT CALL
033   f.f = mctp2tc(fmm.f,0,paramu);
034   %else
035   %% WAFO new call not implemented
036   %f.f = mctp2rfm({fmm.f , []});
037   %f.f = rfm2tcpdf(f.f,0,paramu);
038 end
039 f.cl=qlevels(f.f);
040 tc  = dat2tc(xt);
041 [mM Mm] = tp2mm(tc);
042 if 0,
043   cocc(paramu,Mm,f.f)
044 else
045   ccplot(Mm); hold on
046   pdfplot(f,'k-'), hold off
047 end
048 wafostamp('Figure 10','(NR)')
049 return
050```

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