The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Slider step, value does not agree with setting when sliding vs. using
the arrow

Replies: 16   Last Post: Mar 4, 2013 1:53 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 6,630
Registered: 2/7/05
Re: Slider step, value does not agree with setting when sliding vs.
using the arrow

Posted: Mar 1, 2013 6:06 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/1/2013 4:23 PM, dpb wrote:
> On 3/1/2013 3:50 PM, Nasser M. Abbasi wrote:
>> Oh, and before someone replies saying that I can round
>> the numbers as I want, yes, I know I can do this, but
>> my question is why does the slider does not
>> move by the minor/major steps as expected.

> ...
>
> Nothing in documentation indicates that is expected for other than the
> movement in the arrow/channel portion of the slider control. When you
> position the slider directly, the actual position is returned from
> nearest pixel translated to range. This is Windows behavior and afaik
> there's no OS support to control the actual slider position to the arrow
> minor/major discretization steps.
>
> IOW, it is the way it is...
>


I use rounding now to fix it. So it is not a big deal. But
this behavior makes no sense. A user does not care about
pixel images and such. The semantics of the behavior of
slider should be that it steps by only the minor or major
steps as instructed.

Just because Matlab can't do it, does not mean it is
not possible. Matlab could have very easily did the
rounding internally, just like a user does, so that it
keeps the step size to be the minor step size. (it
has all the information it needs to do this).

I use Mathematica all the time for doing the same thing, and
in Mathematica I can make a slider telling it the steps to move by,
and it always returns values by those increments, regardless
of how small or large they are. Here is an example
(Mathematica uses the third argument for step size, Matlab
uses the second argument). Here the step size is 0.001.

Note that there is only one step size for Mathematica slider.

-------------------
v = 0;
Row[{Slider[Dynamic[v], {0, 1, 0.001}], Dynamic[v]}]
-------------------

Screen shot:

http://12000.org/tmp/030113/slider.png

--Nasser


Date Subject Author
3/1/13
Read Slider step, value does not agree with setting when sliding vs. using
the arrow
Nasser Abbasi
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/1/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs. using the arrow
Doug Schwarz
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/3/13
Read Re: Slider step, value does not agree with setting when sliding vs. using the arrow
Doug Schwarz
3/3/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/4/13
Read Re: Slider step, value does not agree with setting when sliding vs.
matt dash
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
dpb
3/2/13
Read Re: Slider step, value does not agree with setting when sliding vs.
using the arrow
Nasser Abbasi
3/4/13
Read Re: Slider step, value does not agree with setting when sliding vs. using the arrow
Steven Lord

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.