MATLAB: Matrix multiplication issue.. i need the result to be in binary numbers

i have
m=rand(1,4)>0.5;
G=[1 1 1 1 1 0 0 0 1 0 0 0; 0 0 1 1 0 0 0 1 0 1 0 0; 1 1 1 0 1 0 0 1 0 0 1 0; 1 0 0 1 1 1 0 1 0 0 0 1];
when i multiply them c=m*G;
c will be a vector of integer no .. i want it to be a vector of zeros and ones how should i do that?

Best Answer

Dear Mary, you can do it as follow:
m = rand(1,4) > 0.5;
G = [1 1 1 1 1 0 0 0 1 0 0 0; 0 0 1 1 0 0 0 1 0 1 0 0; 1 1 1 0 1 0 0 1 0 0 1 0; 1 0 0 1 1 1 0 1 0 0 0 1];
c = double(logical(m * G));
It is what you need?