i want to generate a sequence of n numbers
Afficher commentaires plus anciens
How would i generate a secuence of N amount of numbers starting at -4 and going up in steps of 2?
Cheers
3 commentaires
Robert U
le 9 Mar 2020
Matte Rennerts
le 9 Mar 2020
Robert U
le 9 Mar 2020
Those sequences work with variables as end values as demonstrated in the answer by Benni.
Réponse acceptée
Plus de réponses (1)
Voss
le 19 Oct 2023
start = -4;
increment = 2;
N = 8;
sequence = start + (0:N-1)*increment;
Catégories
En savoir plus sur Waveform Generation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!