comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » help with stopping criterion - use of BREAK
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
help with stopping criterion - use of BREAK [message #90116] Wed, 28 January 2015 09:09 Go to previous message
g.nacarts is currently offline  g.nacarts
Messages: 148
Registered: November 2013
Senior Member
Hi

I am using an iterative method and I want to add a stopping criterion in which the iterating will stop when there is no change in 3 consecutive iterations. I did the following but I am getting syntax error but I am not sure whether the use of BREAK it's correct. My code is as follows:

COUNTER = 0
IF ABS(OLD_VALUE-NEW_VALUE) EQ 0 THEN COUNTER = COUNTER + 1 $
ELSE COUNTER = 0

IF COUNTER EQ 3 THEN
BREAK
ENDIF
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: triangulation tribulation: alpha shape for raster-to-vector shape extraction (sort of a concave hull)
Next Topic: Sun symbol appears in plot window but not in pdf output

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:19:30 PDT 2025

Total time taken to generate the page: 0.00350 seconds