Descending values in vector...

Hi,
I would like to create a vector that goes from
[ 2244 2243 2242 ... 4 3 2 1 ]
Is this possible?
Linspace seem only creating a vector [ 1 ; 2 ; 3; ... ]

 採用された回答

Sean de Wolski
Sean de Wolski 2012 年 10 月 24 日

6 投票

v = 2244:-1:1
Use negative one as your increment.

1 件のコメント

Deanna Yancey
Deanna Yancey 2020 年 10 月 27 日
How do you decrease from say .9 to 1x10^-5 over 100 iterations?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

タグ

質問済み:

2012 年 10 月 24 日

コメント済み:

2020 年 10 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by