Reputation: 21
How can I create a vector that is
2^1, 2^3, 2^5,..., 2^19
I tried to use V = logspace( log(2)/log(10) , 19*log(2)/log(10) , 10 )
but it didn't work.
Upvotes: 2
Views: 550
Reputation: 2431
create the sequence of the exponents and then raise them:
2.^(1:2:19)
Upvotes: 7