extraction of some elements in a column vector

x = [1:10]'
how do i extract the 1st, 3rd and 6xth element in the column vector.

2 Comments

y=x([1 3 6]);
Read Getting Started section on addressing in the documentation...

Sign in to comment.

Answers (0)

Tags

Asked:

on 10 Nov 2021

Commented:

on 11 Nov 2021

Community Treasure Hunt

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

Start Hunting!