Selecting Every Other Element in a Matrix
Mostra commenti meno recenti
How can I select every other element in a matrix, such as A=[1 2 8 7 6 5 4 6]?
Risposta accettata
Più risposte (1)
prashanth GT
il 2 Mar 2020
0 voti
function y = everyOther(x)
y = x(1:2:length(x));
end
Categorie
Scopri di più su Dates and Time in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!