extraction of some elements in a column vector
Show older comments
x = [1:10]'
how do i extract the 1st, 3rd and 6xth element in the column vector.
2 Comments
dpb
on 10 Nov 2021
y=x([1 3 6]);
Read Getting Started section on addressing in the documentation...
Cris LaPierre
on 11 Nov 2021
Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!