How to create a sequence.

14 次查看(过去 30 天)
I need to create a vector that holds a sequence. In the sequence the previous number is multiplied by 2. The sequence could stop at a desired number lets say 256 (but it could be a bigger number). How would one go about this?
Example sequnce = 2,4,8,16,32,...,256. vector = [2;4;8;16;32;64;128;256]
vector =
2
4
8
16
32
64
128
256

采纳的回答

Sean de Wolski
Sean de Wolski 2014-7-23
  5 个评论
Simon Siu
Simon Siu 2020-2-5
how to you know that!!!!!!!!!!!!!!!?????

请先登录,再进行评论。

更多回答(1 个)

Morm My
Morm My 2021-7-29
thank you very much sir.

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by