Hi. I have written a code to perform circular shift but it does not give me all X28 and Y28 keys . It returns only one X28 and Y28 with out any circular shift.What I did wrong
key_56=1:56;
x=key_56(1:28);
y=key_56(29:56);
R_key=[1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1];
icount=0;
for i=1:16
icount=icount+R_key(i);
I=icount;
end
X28 = circshift(x', -icount)';
Y28 = circshift(y', -icount)';
3 Comments
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/489062-how-to-perform-right-circular-shift#comment_763256
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/489062-how-to-perform-right-circular-shift#comment_763256
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/489062-how-to-perform-right-circular-shift#comment_763257
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/489062-how-to-perform-right-circular-shift#comment_763257
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/489062-how-to-perform-right-circular-shift#comment_763260
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/489062-how-to-perform-right-circular-shift#comment_763260
Sign in to comment.