Perform Operation on only even rows.

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

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 29 de Jul. de 2015
A=randi(9,10,4)
idx=2:2:size(A,1);
Ae=A(idx,:)
Ae1=circshift(Ae,[0 -2])
A(idx,:)=Ae1

Más respuestas (0)

Categorías

Más información sobre Simulink en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 29 de Jul. de 2015

Respondida:

el 29 de Jul. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by