MATLAB: I have the store of sum and want to know the index

MATLABmatrix

i have the store_sum=[ 0.18,0.27,0.43,0.57];
and i want to know the index
starting from colum colum 2 in this matrix

Best Answer

M % name of your matrix
store_sum=[ 0.18,0.27,0.43,0.57];
[~, idx] = ismembertol(store_sum, M(:,2));
idx is index of elements of store_sum in the 2nd column of M.
Related Question