The paper presents a novel approach of pseudo 2D random sampling scheme for application of compressed sensing in Cartesian magnetic resonance imaging (MRI). The proposed scheme is realized by a pulse sequence program which switches the directions of phase encoding and frequency encoding during data acquisition such that both k(x) and k(y) directions can be undersampled randomly. The resulting random sampling pattern approximates the ideal but impractical 2D patterns. Both the simulation and experiment results show the proposed method is superior to the existing 1D random sampling and similar to the ideal 2D random sampling in terms of the reconstruction quality. This method can potentially improve the MR imaging speed through the application of compressed sensing in conventional MRI.