フィルターのクリア

How to make a sequence number?

2 ビュー (過去 30 日間)
Tara
Tara 2013 年 5 月 23 日
Hello,
i have a number 6, i wann get it to the sequence number. it's like an example with randperm(6), but i want it to sequence not randperm, so the result should be 1 2 3 4 5 6.
How can i do this? please help me.thanks in advance

採用された回答

James Tursa
James Tursa 2013 年 5 月 23 日
n = 6;
sequence = 1:n;

その他の回答 (1 件)

David Sanchez
David Sanchez 2013 年 5 月 23 日
n=6;
my_seq=linspace(1,n,n)
my_seq =
1 2 3 4 5 6

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by