Perform Operation on only even rows.
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ellie
le 29 Juil 2015
Réponse apportée : Azzi Abdelmalek
le 29 Juil 2015
How would I go about performing an operation only on the even rows. For example, you have matrix A and you want to cirshift only the even rows. Thanks
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 29 Juil 2015
A=randi(9,10,4)
idx=2:2:size(A,1);
Ae=A(idx,:)
Ae1=circshift(Ae,[0 -2])
A(idx,:)=Ae1
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!