view _misc/figures/.svn/text-base/addmax.m.svn-base @ 9:4ea6619cb3f5 tip

removed log files
author matthiasm
date Fri, 11 Apr 2014 15:55:11 +0100
parents b5b38998ef3b
children
line wrap: on
line source
function addmax(varargin)
if length(varargin)>0 && strcmp(varargin,'rows')
    dimension = 2;
else
    dimension = 1;
end

chil=get(gca,'children');
z = get(chil(1),'CData');
x = get(chil(1),'XData');
[maxind, maxind] = max(z,[],dimension);

if length(x) == 2
    x = x(1):x(2);
end

hold on
m = plot(x, maxind, '.k','Erasemode','xor')
hold off