Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Using the slider values in a Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98969] Re: Using the slider values in a Manipulate
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Wed, 22 Apr 2009 06:36:07 -0400 (EDT)
  • References: <gsmmrq$cup$1@smc.vnet.net>

Hi,

> How can I use the values adjusted with the sliders in a Manipulate
> later in the notebook?
> The only way seems to be the DynamicModule, but that's not exactly
> what I want.
> To be more specific: I'm trying to write a notebook for fitting a
> model function to experimental data, and I want it to be reusable
> since I'll have to use it on different data files again and again.
> I want to plot the data and the model inside a Manipulate, and use the
> sliders to adjust reasonable startig values for my parameters. That
> does work very well, but the next step would be to insert these
> starting values (from the slider adjustments) as starting values in
> FindFit. How do I achieve this? I don't understand how I could use
> DynamicModule to do this, but what other options do I have.

there was another post just today which asks exactly the same thing, so
you might want to check that thread for solutions, too. Here is a short
answer:

Manipulate[
 parameter1 = n;
 Plot[Sin[n x], {x, 0, 2 \[Pi]}, Frame -> True, ImageSize -> 400]
 ,
 {n, 0, 1}
 ]

you can just set a global variable within the Manipulate body and use
that in the rest of the notebook...

hth,

albert


  • Prev by Date: Re: How to get values from Manipulate
  • Next by Date: Re: Application GUI in Mathematica
  • Previous by thread: Using the slider values in a Manipulate
  • Next by thread: Re: Using the slider values in a Manipulate