title: Common way to generate finite geometric series in MATLAB
body: <p>Suppose I have some number <code>a</code>, and I want to get vector <code>[ 1 , a , a^2 , ... , a^N ]</code>. I use <code>[ 1 , cumprod( a * ones( 1 , N - 1 ) ) ]</code> code. What is the best (and propably efficient) way to do it?</p>