Index of a Column Vector
조회 수: 26 (최근 30일)
이전 댓글 표시
Hello,
I want to show the first, the second and the sixth element of a 7x1 vector. Which function i should use ?
Thanks for help!
댓글 수: 0
답변 (1개)
Thiago Henrique Gomes Lobato
2019년 12월 29일
Just use brackets for the array index
A = 1:7;
A([1,2,6])
ans =
1 2 6
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!