function [h, x] = UpdateCursor(h) % UpdateCursor.m % Author: Alexander Khaustov; alexander dot khaustov at gmail dot com % Copyright (C) 2008 St.-Petersburg Institute of Cardiological Technics (Incart), www.incart.ru % This software is released under the terms of the GNU General % Public License (http://www.gnu.org/copyleft/gpl.html). cp= get(gca, 'CurrentPoint'); subplot(gca); hold on; x = floor(cp(1, 1)); if (ishandle(h)) delete(h); end; h = plot([x x], get(gca, 'YLim'), 'k'); hold off; return;