MATLAB: How to plot graph the values of given program

plotting

I have this program and after running I ll get the values.
Now I need to plot all the values.
how to to that?
Help me.
Thank you
clc;
clear all;
A= [0 1 0 1 1 1 0 0
1 0 1 1 0 0 0 0
0 0 1 1 1 1 0 0
1 0 0 1 1 0 1 0
1 0 0 1 1 0 0 0
0 1 0 1 0 1 0 0
0 1 1 0 0 1 1 0
1 0 0 1 0 1 0 0] ;
N=64;
for n=0:(N-1);
B= circshift(A,n);
N = 64;
C= A==B ;
a=sum(C(C==1));
d= N-a;
R=zeros(n,1);
R=(a-d)/N;
disp(R);
end

Best Answer

Try this:
A= [0 1 0 1 1 1 0 0
1 0 1 1 0 0 0 0
0 0 1 1 1 1 0 0
1 0 0 1 1 0 1 0
1 0 0 1 1 0 0 0
0 1 0 1 0 1 0 0
0 1 1 0 0 1 1 0
1 0 0 1 0 1 0 0] ;
N=64;
nv = 0:(N-1);
R = zeros(size(nv));
for n=1:numel(nv)
B= circshift(A,nv(n));
N = 64;
C= A==B ;
a=sum(C(C==1));
d= N-a;
R(n) = (a-d)/N;
% disp(R);
end
figure
plot(nv, R)
grid
How to plot graph the values of given program - 2019 05 01.png