  The electronic spectra of long carbon nanotubes (CNTs) can, to a very good
approximation, be obtained using the dispersion relation of graphene with both
angular and axial periodic boundary conditions. In short CNTs one must account
for the presence of open ends, which may give rise to states localized at the
edges. We show that when a magnetic field is applied parallel to the tube axis,
it modifies both momentum quantization conditions, causing hitherto extended
states to localize near the ends. This localization is gradual and initially
the involved states are still conducting. Beyond a threshold value of the
magnetic field, which depends on the nanotube chirality and length, the
localization is complete and the transport is suppressed.
