Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 5th, 2012  |  syntax: None  |  size: 0.25 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. matlab selecting regions in matlab plot
  2. hax = axes( ... , 'ButtonDownFcn', @OnClickAxes);
  3.        
  4. function OnClickAxes( hax, evt )
  5.  
  6. point1 = get(hax,'CurrentPoint'); % hax is handle to axes
  7. rbbox;
  8. point2 = get(hax,'CurrentPoint'); % hax is handle to axes
  9.  
  10. end