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

MathGroup Archive 2009

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

Search the Archive

dynamicmodule with f[x_] possible?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104470] dynamicmodule with f[x_] possible?
  • From: matthew kooshad <matthewkooshad at gmail.com>
  • Date: Sun, 1 Nov 2009 04:01:27 -0500 (EST)

hello, i would like to make f[x_] dynamic and based on input.
i've tried changing "a = 0" for example to f[_x] = 0 and replacing all
other "a" with f[x], but no luck there. will someone please guide me
on this? thank you :)

DynamicModule[{a = 0, b = 0},
 Deploy[Style[
   Panel[Grid[
     Transpose[{{Style["a", Red], Style["b", Red],
        "sum", "diff", "product"}, {InputField[Dynamic[a]],
        InputField[Dynamic[b]],
        InputField[Dynamic[a + b], Enabled -> False],
        InputField[Dynamic[a - b], Enabled -> False],
        InputField[Dynamic[ab], Enabled -> False]}}],
     Alignment -> Right], ImageMargins -> 10],
   DefaultOptions -> {InputField -> {ContinuousAction -> True,
       FieldSize -> {{5, 30}, {1, Infinity}}}}]]]


  • Prev by Date: Factor and/or Rules replacements
  • Next by Date: Re: Answer for Simplify[Cos[x]^4-Sin[x]^4]?
  • Previous by thread: Re: Factor and/or Rules replacements
  • Next by thread: Re: dynamicmodule with f[x_] possible?