pulling our elements from a matrix using for loop

2 views (last 30 days)
if matrix A = [1 3 4 2 17 6 4 5 2]
what is a matrix command that i can use it to pull first 6 elements?

Accepted Answer

Star Strider
Star Strider on 26 Feb 2018
Try this:
B = A(1:6);

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!