I1=imread('lina512.bmp');
I2=imresize(I1,[16 16]);figure;imshow(I2)
I=I2(:,:,1);figure;imshow(I)
csm = @(I,Col) circshift(I(:,Col),[3 1-Col]);
callcsm = @(I) csm(I, 1:size(I,2));
HH = callcsm(I);
csm1 = @(row,I) circshift(I(row,:),[1-row,3]);
callcsm1 = @(I) csm1(1:size(I,1),I);
HH1 = callcsm1(I);
1 Comment
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/512265-how-to-shift-rows-of-a-matrix-with-a-specific-number#comment_813595
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/512265-how-to-shift-rows-of-a-matrix-with-a-specific-number#comment_813595
Sign in to comment.