To talk on Icrontic, just register!

It only takes 30 seconds.

Have an account? Sign in:

Forgot?
yohn
New to the neighborhood
yohn
1 Posts

matlab gui - getting clicked position variables

Hello
I have a problem with matlab gui. I want to get the position of click (on axis) and to draw a point there. Everything is ok if it is blank axis. When there is an image shown in it, all is not working.

The code: Main programme
-----------------------------------------------
h = figure(4)
uklad = newplot;

A = imread('car1.jpg');

% imagesc(A); %"turns on" the image


hold on;
set(uklad,'ButtonDownFcn','Click');
------------------------------------------------
Function in a file Click.m

function Click

p = get(gca,'CurrentPoint')
plot(p(1,1),p(1,2),'o-');
drawnow;


Help. How to do the same with the picture shown
yohn(at)interia.pl
Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with MATLAB GUI pbutter Matlab Help 0 28 Sep 2007 5:44pm
gui matlab help tmh88 Matlab Help 4 30 May 2007 2:07am

Go Back   Icrontic Forums > Tech: Software > General Software > Matlab Help
Jump to
This Thread Search this Thread
Search this Thread:

Advanced Search


Current time: 4:04am (GMT)
Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Get Vanilla instead. Trust me.