Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
ginput digits

Subject: ginput digits

From: Jessica

Date: 8 Dec, 2009 22:28:02

Message: 1 of 6

Does anyone know how to increase the number of decimal places of [x,y] that are reported with ginput? The default seems to be the ones digit but I would like up to the 0.001 place.

Subject: ginput digits

From: dpb

Date: 8 Dec, 2009 22:51:39

Message: 2 of 6

Jessica wrote:
> Does anyone know how to increase the number of decimal places of
> [x,y] that are reported with ginput? The default seems to be the ones
> digit but I would like up to the 0.001 place.

I'd guess it has to do w/ the resolution of the axis and mouse movement.
  What happens if you stretch the axis range; do you then get more
apparent resolution?

--

Subject: ginput digits

From: Jessica

Date: 9 Dec, 2009 13:11:03

Message: 3 of 6

dpb <none@non.net> wrote in message <hfmlac$saj$1@news.eternal-september.org>...
> Jessica wrote:
> > Does anyone know how to increase the number of decimal places of
> > [x,y] that are reported with ginput? The default seems to be the ones
> > digit but I would like up to the 0.001 place.
>
> I'd guess it has to do w/ the resolution of the axis and mouse movement.
> What happens if you stretch the axis range; do you then get more
> apparent resolution?
>
> --

How do you stretch the axis range by typing something into the command window? I am currently just using imshow to display an image and then ginput to select some points on it.

Subject: ginput digits

From: dpb

Date: 9 Dec, 2009 14:21:54

Message: 4 of 6

Jessica wrote:
> dpb <none@non.net> wrote in message <hfmlac$saj$1@news.eternal-september.org>...
>> Jessica wrote:
>>> Does anyone know how to increase the number of decimal places of
>>> [x,y] that are reported with ginput? The default seems to be the ones
>>> digit but I would like up to the 0.001 place.
>> I'd guess it has to do w/ the resolution of the axis and mouse movement.
>> What happens if you stretch the axis range; do you then get more
>> apparent resolution?
>>
>> --
>
> How do you stretch the axis range by typing something into the
> command window? I am currently just using imshow to display an image
> and then ginput to select some points on it.

doc axis

AFAIK there's no option to tell ginput how many digits of precision to
return; my suggestion was one for determining if, indeed, what it does
return is based on the resolution of the graph axes or not.

Not sure there's anything you can do, specifically; maybe somebody else
will chime in (like S Lord who'll either know or have access to the
internals of how ginput is implemented). Oh....wait--lessee; yeah,
ginput() is an m-file--I don't see anything that is other than a get()
on the handle w/ property 'CurrentPoint' into a double.

--

Subject: ginput digits

From: Steven Lord

Date: 9 Dec, 2009 15:06:50

Message: 5 of 6


"dpb" <none@non.net> wrote in message
news:hfobqp$6v0$1@news.eternal-september.org...
> Jessica wrote:
>> dpb <none@non.net> wrote in message
>> <hfmlac$saj$1@news.eternal-september.org>...
>>> Jessica wrote:
>>>> Does anyone know how to increase the number of decimal places of
>>>> [x,y] that are reported with ginput? The default seems to be the ones
>>>> digit but I would like up to the 0.001 place.
>>> I'd guess it has to do w/ the resolution of the axis and mouse movement.
>>> What happens if you stretch the axis range; do you then get more
>>> apparent resolution?
>>>
>>> --
>>
>> How do you stretch the axis range by typing something into the
>> command window? I am currently just using imshow to display an image
>> and then ginput to select some points on it.
>
> doc axis
>
> AFAIK there's no option to tell ginput how many digits of precision to
> return; my suggestion was one for determining if, indeed, what it does
> return is based on the resolution of the graph axes or not.

My guess is that the OP is using the default display format, or perhaps a
very large set of axis limits, where one pixel on the screen covers a large
area in data space.

Jessica, try executing this command to see if the former is the problem:

    format long g

That will change how MATLAB displays variables.

Changing the axis limits as dpb suggested will test if the latter is the
problem.

If that doesn't resolve the problem, you should post a small piece of
standalone code (with a SMALL data set) with which you can reproduce the
problem, and/or send that section of code (and the output of the VER
function) to Technical Support for investigation.

> Not sure there's anything you can do, specifically; maybe somebody else
> will chime in (like S Lord who'll either know or have access to the
> internals of how ginput is implemented). Oh....wait--lessee; yeah,
> ginput() is an m-file--I don't see anything that is other than a get() on
> the handle w/ property 'CurrentPoint' into a double.

BTW, dpb, I like the name of your news server. But didn't that end in
February of 2005? :)

http://en.wikipedia.org/wiki/Eternal_September

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

Subject: ginput digits

From: dpb

Date: 9 Dec, 2009 18:57:34

Message: 6 of 6

Steven Lord wrote:
> "dpb" <none@non.net> wrote in message
...

>> AFAIK there's no option to tell ginput how many digits of precision to
>> return; my suggestion was one for determining if, indeed, what it does
>> return is based on the resolution of the graph axes or not.
>
> My guess is that the OP is using the default display format, or perhaps a
> very large set of axis limits, where one pixel on the screen covers a large
> area in data space.
>
> Jessica, try executing this command to see if the former is the problem:
>
> format long g
>
> That will change how MATLAB displays variables.
>
> Changing the axis limits as dpb suggested will test if the latter is the
> problem.
...

Yes, should've thought of simply a display issue, Steve; I was focussed
(so to speak :) ) on the possibility of the axis range causing
pixilation showing up...

...

> BTW, dpb, I like the name of your news server. But didn't that end in
> February of 2005? :)
>
> http://en.wikipedia.org/wiki/Eternal_September

Not sure what the wiki article says and as wikipedia loads so slowly on
my dialup i'm not going to try to see at the moment but whether it's a
separate/new venture don't know but there is still an
eternal-september.org running a free (donations accepted) newsserver...

<http://www.eternal-september.org/>

Again, being limited by access speed, the newsreader is quicker than
most gui interfaces load.

--

Tags for this Thread

No tags are associated with this thread.

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.

Contact us