If statement

Is i possible to specify an if cycle for endogenous variables ? I would like to have something like
"if w<w(-1)
w=w(-1)
else
w=..."
"if w<w(-1)
w=w(-1)
else
w=..."
Forums for asking questions, posting comments and uploading examples related to Dynare
http://www.dynare.org/phpBB3/