Mercurial > hg > mauch-mirex-2010
annotate _misc/figures/addmax.m @ 9:4ea6619cb3f5 tip
removed log files
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:55:11 +0100 |
parents | b5b38998ef3b |
children |
rev | line source |
---|---|
matthiasm@8 | 1 function addmax(varargin) |
matthiasm@8 | 2 if length(varargin)>0 && strcmp(varargin,'rows') |
matthiasm@8 | 3 dimension = 2; |
matthiasm@8 | 4 else |
matthiasm@8 | 5 dimension = 1; |
matthiasm@8 | 6 end |
matthiasm@8 | 7 |
matthiasm@8 | 8 chil=get(gca,'children'); |
matthiasm@8 | 9 z = get(chil(1),'CData'); |
matthiasm@8 | 10 x = get(chil(1),'XData'); |
matthiasm@8 | 11 [maxind, maxind] = max(z,[],dimension); |
matthiasm@8 | 12 |
matthiasm@8 | 13 if length(x) == 2 |
matthiasm@8 | 14 x = x(1):x(2); |
matthiasm@8 | 15 end |
matthiasm@8 | 16 |
matthiasm@8 | 17 hold on |
matthiasm@8 | 18 m = plot(x, maxind, '.k','Erasemode','xor') |
matthiasm@8 | 19 hold off |