Thread Subject: ginput problem

Subject: ginput problem

From: Michael Spurr

Date: 10 Dec, 2008 11:09:02

Message: 1 of 3

I'm having trouble with the ginput command. I use it in a program to extract data points from a graph displayed on screen by clicking the mouse on the axes and plot. Previously, this program and ginput worked without any problem. However, just today I tried to use the program again and nothing happened after the first use of ginput. I selected the points on the plot and pressed return, after which Matlab displayed the 'busy' status indicator but did not move on to the next part of the program. When forcing the program to stop through control-c, I got the following message:

Error in ==> ginput at 99
keydown = wfbp;

Error in ==> plot_sample at 17
[X,Y] = ginput;

Has anyone come across this problem? Any idea why ginput has suddenly stopped working for me?

Many thanks,

Michael

Subject: ginput problem

From: Dave Brackett

Date: 14 Dec, 2008 21:08:02

Message: 2 of 3

"Michael Spurr" <michael.spurr@nospam.selexgalileo.com> wrote in message <gho80e$bv2$1@fred.mathworks.com>...
> I'm having trouble with the ginput command. I use it in a program to extract data points from a graph displayed on screen by clicking the mouse on the axes and plot. Previously, this program and ginput worked without any problem. However, just today I tried to use the program again and nothing happened after the first use of ginput. I selected the points on the plot and pressed return, after which Matlab displayed the 'busy' status indicator but did not move on to the next part of the program. When forcing the program to stop through control-c, I got the following message:
>
> Error in ==> ginput at 99
> keydown = wfbp;
>
> Error in ==> plot_sample at 17
> [X,Y] = ginput;
>
> Has anyone come across this problem? Any idea why ginput has suddenly stopped working for me?
>
> Many thanks,
>
> Michael

can you post your code? the error message doesn't say much and has probably only been displayed because of the forced exiting of the function using ctrl+c.

have you tried using ginput with a set number of points as a test? e.g. [x,y]=ginput(2)

Subject: ginput problem

From: Michael Spurr

Date: 15 Dec, 2008 08:34:02

Message: 3 of 3

This is highly embarassing, but it turns out I was pressing 'return' on the wrong window! I was doing it on the Matlab window rather than the image window. It appears that my brain is already shutting down for the Christmas period!

Thanks for the advice and sorry about the waste of time.

Michael

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
ginput Michael Spurr 10 Dec, 2008 06:10:18
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com