matlab求矩阵的鞍点

function count = andian(a)
v = max(a,[],2);
count = 0;
for i=1:length(v)
    [r2,c2] = find(a==v(i));
    mi = min(a(:,c2));
    if(v(i) == mi)
    count = v(i);
    end
end
end
clc;
clear;
a = [1:4;5:8;9:12;13:16]
disp('求出的按点如下:');
andian = andian(a)


posted @ 2014-10-31 20:45  meiyouor  阅读(1503)  评论(0编辑  收藏  举报