MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Is it Possible to Create a Logarithmic Slider Control?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117358] Re: Is it Possible to Create a Logarithmic Slider Control?
  • From: David Annetts <david.annetts at iinet.net.au>
  • Date: Wed, 16 Mar 2011 06:26:31 -0500 (EST)

Hi Morgan,

What about using

{{r, 2, "Log10(r)"}, 2, 5, .1}

and replacing r by 10^r in your expression?

D.

On 15/03/2011 19:06, Morgan Sutherland wrote:
> Greetings List,
>
> *Question also posted here: *
> http://stackoverflow.com/questions/5307244/logarithmic-slider-control-in-mathematica
>
> I'm making a small interface for calculating voltage dividers in
> Mathematica. I have two sliders (z1&  z2) that represent the resistor values
> and a couple of sliders to represent Vin as a sinusoid.
>
> The issue is that the range of available resistor values (in the real world)
> is roughly logarithmic on {r, 100, 1,000,000}. If I set my slider range to r,
> however, it's impractical to select common low resistor values in approx. {100,
> 10,000}.
>
> Is it possible to create a slider that sweeps through a logarithmic range?
>
> Thanks!
>
> Manipulate[
>   Grid[{{Plot[(VinR*Cos[t] + VinC), {t, -3, 9},
>       PlotRange ->  {-1, VMax}, AxesLabel ->  {t, Vin}]}, {Plot[
>       z2/(z1 + z2)*(VinR*Cos[t] + VinC), {t, -3, 9},
>       PlotRange ->  {-1, VMax}, AxesLabel ->  {t, Vout}]}},
>    ItemSize ->  20],
>   {{z1, 10000}, 10, 1000000, 10}, {z1}, {{z2, 10000}, 10,
>    1000000}, {z2}, Delimiter, {{VinR, 2.5}, 0,
>    5}, {VinR}, {{VinC, 2}, -VMax, VMax}, {VinC}]
>


  • Prev by Date: Re: a warning message that would not go off even if you turn it off
  • Next by Date: Re: how to partition a list
  • Previous by thread: Is it Possible to Create a Logarithmic Slider Control?
  • Next by thread: Re: Is it Possible to Create a Logarithmic Slider Control?