DEMOCC_TPDEF illustrates the definition of turning points. CALL: democc_tpdef(L) Used by democc
Flush pending graphics events. | |
Hold current graph. | |
Linear plot. | |
Set object properties. |
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
Comments or corrections to the WAFO group