I improved my implementation of updateetaz.m by making it easier to
follow and more efficient.