Suppose I want to run a loop for integers $i = 2,2^2,2^3, \dots,2^n$
How would I do this? That is, suppose I want to evaluate some function f(i) through the increments $2, 2^2, 2^3$. I understand that for loops in MatLab can only take arithmetic difference step size, but not geometric ones.
Just run the loop from $i=1\dots n$ and calculate the power of $2$ manually
Psuedocode: