Common way to generate finite geometric series in MATLAB

前端 未结 2 1166
攒了一身酷
攒了一身酷 2021-01-18 02:06

Suppose I have some number a, and I want to get vector [ 1 , a , a^2 , ... , a^N ]. I use [ 1 , cumprod( a * ones( 1 , N - 1 ) ) ] cod

2条回答
提交回复
热议问题