How to extract a specific value within given range and row and column number which has a specific value.
12 views (last 30 days)
Nobel Mondal on 2 Oct 2015
>> randMatrix = (0.02*rand(5,1) - 0.01); % A random 5x1 matrix
>> [~, id] = min(abs(randMatrix - 0.003));
This would work for a vector. Please see Jan Simon's answer here to extend the logic for matrices.