MathGroup Archive 2011

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

Search the Archive

Is it Possible to Create a Logarithmic Slider Control?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117336] Is it Possible to Create a Logarithmic Slider Control?
  • From: Morgan Sutherland <skiptracer at gmail.com>
  • Date: Tue, 15 Mar 2011 06:06:41 -0500 (EST)
  • Reply-to: skiptracer at gmail.com

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: how to partition a list
  • Next by Date: Re: $MaxNumber
  • Previous by thread: Re: eigenvector computations
  • Next by thread: Re: Is it Possible to Create a Logarithmic Slider Control?