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

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 29일

0 개 추천

A=randi(9,10,4)
idx=2:2:size(A,1);
Ae=A(idx,:)
Ae1=circshift(Ae,[0 -2])
A(idx,:)=Ae1

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

태그

질문:

2015년 7월 29일

답변:

2015년 7월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by