while

Parent Previous Next

while





while expression



 ...



end


Notes

  • expression should be either a logical statement or a scalar.
  • When expression is a scalar, it evaluates as true if it is nonzero; otherwise it is false.

Examples

AUX> vec=[2 8 -1 4]; k=1;
while 1
 if vec(k) < 0
  break
 end
end
AUX> k

k =
 3

Created with the Personal Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source