MATLAB: Comparing two matrices satisfying two conditions.

MATLAB and Simulink Student Suitematrixmatrix array

Hi, I am new in matlab and unable to solve a problem.
Problem goes like this:
I have two matrices named: total_load and maxLoad: both of them 16*1 matrix.
I want to know BestRoute. The condition is to find (min(total_load) && ~max(maxLoad));
Which mean I want to find minumum in total_load matrix but excluding row which contains maximum in maxLoad matrix. I want to display BestRoute in terms of position of total_load matrix.

Best Answer

[~, idx] = max(maxLoad);
mtl = min(totalLoad([1:idx-1 idx+1:end]));