필터 지우기
필터 지우기

How do I only take the first 1000 elements of a vector?

조회 수: 243 (최근 30일)
Anne Nguyen
Anne Nguyen 2019년 10월 13일
댓글: Stephen23 2022년 4월 27일
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!

채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 13일
NameOfVariable(1:1000)
  댓글 수: 3
Felix Mätzler
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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by