How do I only take the first 1000 elements of a vector?
조회 수: 309 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2019년 10월 13일
NameOfVariable(1:1000)
댓글 수: 3
Felix Mätzler
2022년 4월 27일
편집: Felix Mätzler
2022년 4월 27일
I think something like this:
NameOfVariable(length(NameOfVariable) - 999 : length(NameOfVariable))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!