How do I only take the first 1000 elements of a vector?
579 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Anne Nguyen
il 13 Ott 2019
Commentato: Stephen23
il 27 Apr 2022
My task is to use the first 1000 elements in a vector. So how do I only take the first 1000 elements of a vector? I am new to MATLAB, so any help would be appreciated. I tried finding a source to read about how to do this, but could not find one. Thank you!
0 Commenti
Risposta accettata
Walter Roberson
il 13 Ott 2019
NameOfVariable(1:1000)
3 Commenti
Felix Mätzler
il 27 Apr 2022
Modificato: Felix Mätzler
il 27 Apr 2022
I think something like this:
NameOfVariable(length(NameOfVariable) - 999 : length(NameOfVariable))
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!