Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
Software
»
comp.softsys.matlab
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
finding a column that has X element in each row
Replies:
5
Last Post:
Nov 19, 2012 2:07 AM



Jinsoo
Posts:
8
Registered:
9/27/12


finding a column that has X element in each row
Posted:
Nov 18, 2012 9:29 PM


Hi,
I have a question regarding how to find a column that has X element in each row. For example, a= [ 1 2 3 4 5 2 1 4 3 5 3 4 5 1 2]
I would like to find a column that has element 2 in each row. My goal is to turn out data (from the above example) [2 1 5] which means [column 2, column 1, column 5]
Is there any way to do this?



