In order to use this code or any (modified) part of it in any publication, please cite the paper: A. Alkhateeb, O. El Ayach, G. Leus, R. W. Heath Jr, “Channel Estimation and Hybrid Precoding for Millimeter Wave Cellular Systems,” IEEE Journal of Selecte