 <p>As already mentioned, you can instruct <code>RAND</code> to generate numbers directly as single precision, and it's definitely best to generate the numbers in a decent sized chunk. If you still need more performance, and you have Parallel Computing Toolbox and a supported NVIDIA GPU, the <code>gpuArray.rand</code> function can be even faster, especially if you select the philox generator like so:</p> <pre><code>parallel.gpu.RandStream('Philox4x32-10') </code></pre>