I want to make a function that search for a value of y in x, either one element or sum of many elements, and return 1 or 0 to matrix Z, which is the same size as X, based on the elements chosen from X.
Example:
y=7;x=[10 -1 -2 -3];
solution will be:
1) 10-1-2=7 ==> Z=[1 1 1 0];2) 10-3=7 ==> Z=[1 0 0 1];
Any hints?
Best Answer