How do I only take the first 1000 elements of a vector?
70 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anne Nguyen
am 13 Okt. 2019
Kommentiert: Stephen23
am 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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 13 Okt. 2019
NameOfVariable(1:1000)
3 Kommentare
Felix Mätzler
am 27 Apr. 2022
Bearbeitet: Felix Mätzler
am 27 Apr. 2022
I think something like this:
NameOfVariable(length(NameOfVariable) - 999 : length(NameOfVariable))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!