Home > wafo > wdemos > democc_tpdef.m

democc_tpdef

PURPOSE ^

illustrates the definition of turning points.

SYNOPSIS ^

democc_tpdef(L)

DESCRIPTION ^

 DEMOCC_TPDEF illustrates the definition of turning points. 
  
  CALL: democc_tpdef(L) 
  
  Used by democc

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

01 function democc_tpdef(L) 
02  
03 %DEMOCC_TPDEF illustrates the definition of turning points. 
04 % 
05 % CALL: democc_tpdef(L) 
06 % 
07 % Used by democc  
08  
09 % Tested on: matlab 5.3 
10 % History: 
11 % Revised by PJ 10-Jan-2000 
12 %   updated for WAFO 
13 % Original version by Mats Frendahl 
14  
15 k=1; hold on 
16 plt = plot(0,min(L(:,1)),'.','erasemode','xor','markersize',16); 
17 pltmax = plot(L(k,1),L(k,2),'c.','erase','none','markersize',10); 
18 pltmin = plot(L(k,1),L(k,2),'r.','erase','none','markersize',10); 
19 for k = 2:length(L)-1 
20    set(plt,'xdata',L(k,1),'ydata',L(k,2)) 
21    if ( (L(k-1,2)<=L(k,2)) & (L(k,2)>L(k+1,2)) ) 
22       set(pltmax,'xdata',L(k,1),'ydata',L(k,2)) 
23    elseif ( (L(k-1,2)>=L(k,2)) & (L(k,2)<L(k+1,2)) ) 
24       set(pltmin,'xdata',L(k,1),'ydata',L(k,2)) 
25    end 
26    drawnow 
27 end; 
28 hold off 
29

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