I higly recommend this article, if you can get your hands on it: https://www.sciencedirect.com/science/article/pii/S0306261915016311
It presents, among other things, how to implement a measurement matrix for compressive sensing in a hardware system. Disclaimer: this article is a bit difficult to decypher, as are all articles in compressive sensing.
If your measurement matrix size is MxN then use randn(M,N); where i have assumed measurement matrix is normally distributed. u can also use random binary matrix .