Given a binary matrix A of size n x k, i would like to create an Label of size n x 1 such that the Label(1) contains a string which has the columns numbers of A(1,:) where the entries are 1.
for example if A(1,:) = [ 0 1 0 1 ] then Label(1) = ’24’
if A(2,:) = [ 0 0 1 0] then Label(2) = ‘3’
if A(3,:)= [ 1 1 1 1] then Label(3) = ‘1234’ and so on
Given a binary matrix A of size n x k , i would like
Share
1 Answer