Selecting Every Other Element in a Matrix
이전 댓글 표시
How can I select every other element in a matrix, such as A=[1 2 8 7 6 5 4 6]?
채택된 답변
추가 답변 (1개)
prashanth GT
2020년 3월 2일
0 개 추천
function y = everyOther(x)
y = x(1:2:length(x));
end
카테고리
도움말 센터 및 File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!