and if i have this matrix A , a , b
A = [ 1 3 1 1 2 2 2 0 ] a = [ 4 which mean how there is one in A 2 4 2 ] b = [ 2 which mean how there is element in A 2 2 1 ]
after that i want to do this
F = zeros(4,5);for k=1:n if m == ( a(k) + ( b(k) - 1 )) IF the condition is true then goes to the same k row in A and put it in F the ones like that
After apply this loop then in first row and in third row the condition is true
F = [ 1 0 1 1 1 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 ]
Best Answer