Mercurial > repos > public > sbplib
view +draw/prompt_point.m @ 1213:43f1cd11e8e8 feature/poroelastic
Add physical normals to AnisotropicCurvilinear
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Mon, 14 Oct 2019 13:54:50 -0700 |
parents | 00eb5db89da5 |
children |
line wrap: on
line source
function [p, button] = prompt_point(s, varargin) default_arg('s',[]) set(gcf,'Pointer','crosshair') if ~isempty(s) fprintf(s, varargin{:}); end fh = gcf(); ah = gca(); function get_point(src, event) cp = ah.CurrentPoint; p = cp(1,1:2)'; fh.WindowButtonUpFcn = []; end fh.WindowButtonUpFcn = @get_point; waitfor(fh,'WindowButtonUpFcn', []) set(gcf,'Pointer','arrow') end