Suppose I have a matrix:
Pears Blueberries Oranges Apricot Apple
Pears 1 0 0 1 0
Blueberries 1 1 1 1 0
I want to list out the elements that have "1" in row "Pears" and "Blueberries". I want to obtain some outcome like: Set for pears = Pears, Apricot Set for blueberries = Pears, Blueberries, Oranges, Apricot
Is there any code that can help me to achieve that?
Thank you.