Effacer les filtres
Effacer les filtres

How to make a sequence number?

3 vues (au cours des 30 derniers jours)
Tara
Tara le 23 Mai 2013
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

Réponse acceptée

James Tursa
James Tursa le 23 Mai 2013
n = 6;
sequence = 1:n;

Plus de réponses (1)

David Sanchez
David Sanchez le 23 Mai 2013
n=6;
my_seq=linspace(1,n,n)
my_seq =
1 2 3 4 5 6

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by