MATLAB: How to find index of cell array

cell array index row

I want to the find row number of where the elements of cell array "motors_cell" match cell array "get_motors_no_workbook2" . The row number refers to where the match occurred in the cell "get_motors_no_workbook2". This should be done for any size of "motors_cell" and for different values as well.
Note: size of "get_motors_no_workbook2" can have multiple rows but one column.

Best Answer

doc ismember
should work for this I think. e.g.
a = { 'a', 'b', 'c' };
b = { 'b', 'd', 'a', 'a', 'h', 'b' };
[~, idx] = ismember( b, a );
will give, for each element in b the index of the same element in a, if one exists. From that you should be able to get what you want.