I have a question to the mapping of a matrix with another matrix which contains only 1 and 0. Here an example of my problem: A is the matrix with doubles
A
Just multiply A and B element-wise:
C = A.*B