Commensurability and stability in nonperiodic systems.