Variable magnet arrays to passively shim compact permanent-yoke magnets.