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

316 views (last 30 days)
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!

Accepted Answer

Walter Roberson
Walter Roberson on 13 Oct 2019
NameOfVariable(1:1000)
  3 Comments

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!