New answers tagged

3

I think this is a bug in the RPi version of the software. Consider the following code: DialogInput[{InputField[Dynamic@x], Dynamic@x, Button["ok", DialogReturn[x]]}] In v9 on Windows, you can see that that x is updated right before the dialog box closes. The same code on the RPi does not result in an updated value It seems as if the RPi version ...


0

this is an answer also a question at the same time. I am simply trying to avoid using sliders and predefined functions to increase the capacity of the CDF file. I changed my example to taking integral and use inputfield for the function and upper and lower limit. It completely functional but not best presentation and controls. Here is the code ...


1

Here's another simple modification of your code that allows you to specify the function, Manipulate[ DynamicModule[{f = Sin}, Column[{InputField[Dynamic[f]], Dynamic[Plot[f[o x + p], {x, -5, 5}]]}]], {o, 1, 10}, {p, 2, 10}] Now you can change Sin to any built-in function that takes a single argument, and still modify o and p. You can even ...


2

Hope I understood your question correctly. I might require to modify the code if I misinterpreted your OP. Example: Manipulate[ Plot[f[x], {x, min, max}], {{f, Sin, "Function"}, {Sin, Cos, Tan}}, {{min, 0, "Min."}, 0, 2 Pi}, {{max, 2 Pi, "Min."}, 0, 2 Pi} ] Output:


1

Not sure why you define x and then never use it but despite that try this: ret = DialogInput[ DialogNotebook[{ DynamicModule[{input}, Grid[{{"f(x)=", InputField[Dynamic[input], String]}, {"", "Input expression f(x)"}, {"", DefaultButton["OK", DialogReturn[input]]}}, Spacings -> {0.5, Automatic}, Alignment -> ...



Top 50 recent answers are included