Getting saddle points of a matrix
Your solution works, but it will be quite slow. For every element in your matrix (m*n many), you check if it is the maximum in the row (n comparisons), and then check if it is the minimum in the column (m comparisons). This will mean that you do a total of m*n*(m+n) many comparisons. You can save some time by only computing the maximum and minimum once, going down to m*n + m + n.

Also, MATLAB hates for loops. Built-ins are optimized and can take advantage of any hardware acceleration or parallelism that your computer offers. Loops on the other hand are always executed sequentially. If you can avoid them and use built-ins instead, it will usually make your code faster.

function [row, col]=saddle(matrix)

% first lets get the min/max for the column/row respectively
minima = min(matrix,[],1) % minimum of each column
maxima = max(matrix,[],2) % maximum of each row

% then, for each element in the column/row check if it matches the min/max
isMinimum = minima == matrix
isMaximum = matrix == maxima

% it needs to be both to be a saddle
saddles = isMinimum &amp; isMaximum

% lastly, figure out the index of each saddle point
% and transform it to the desired output format
[row, col] = find(saddles)


Disclaimer: My MATLAB licence expired this week and I have to wait to renew it. The above code is untested, so there might be the odd typo.