hii i have this
f= 1 0 0 1 0 2 1 3 0 4 1 5 1 6 0 7
this indicate the numbers from 0 to 7 in decimal i want to regroupe the 1 in a matrix and at the same time tell which number it is and do the same thing with 0 i have a mistake somewhere here's the program
N=8;r=3;A=zeros(N,r);Q=zeros(N,1);for k=0:1:N-1A(k+1,:)=dec2bin(k,r)-'0';Q(k+1,1)=xor(xor(A(k+1,1),A(k+1,2)),A(k+1,3));f=xor(Q,1);endfor k=0:1:N-1if f(k+1)==1 se=k S(k+1,1)=seelsess=kC(k+1,1)=ssendendS = 0 0 0 0 3 5 0 6
C =
0 1 2 0 4 0 0 7 i don't know how to do to delete the 0 i just want 0356 and 1247 to appearsi hope you understand me
Best Answer