A very simple question about a column vector creation
3 ビュー (過去 30 日間)
古いコメントを表示
I am an extra beginner MATLAB user. There is a 1:m command to create a 1 2 .... m row matrix. However, I couldn't find how to create a column vector as 12: 13-m. I mean (assume m=5):
12
11
10
9
8
0 件のコメント
採用された回答
Star Strider
2016 年 7 月 9 日
If you want to decrement a vector, begin with the highest number and increment by a negative value to the desired end value. Here, the decrement value is -1:
m = 5;
v = [12: -1: m]'
v =
12
11
10
9
8
7
6
5
Is this what you want to do?
2 件のコメント
Star Strider
2016 年 7 月 9 日
My pleasure.
My apologies for the inaccurate code. I misunderstood your Question.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!