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 で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!