MATLAB: How to find single index values in a matrix

matrix

B1 = [2 4 6 8; 10 12 14 16; 18 20 22 24; 26 28 30 32]
idx_8=find(B1==8)
[row,column]=find(B1~=8)
RowColumn = [row:column]
Find the single index values for 26, 4, and 28?
How is a matrix indexed with single indexing values?

Best Answer

Linear_indices = find(ismember(B1,[26 4 28])); % you mean linear indices by saying single indices
B1(Linear_indices) % would give [26 4 28]