New answers tagged

1

I think second argument to Dynamic of InputField should help you. With it n is updated to the changed input and at the same time points are reinitialized. Help on input field says you can't use ContinuousAction with general expression, this is why Number type is specified. DynamicModule[{n = 2}, DynamicModule[{make, points}, make[n_Integer] := RandomReal[...


0

Got everything working the way I want it to. Here is the code below if anyone ever wants to model a cantilever bending on a box. Manipulate[h = x /. Quiet@Solve[k == x*Cos[\[Theta]] - (p*x^2)/(6*c*d) (3 f + x) Sin[\[Theta]], x, Reals][[1]]; a = x /.Quiet@Solve[l == x*Cos[\[Theta]] - (p*x^2)/(6*c*d) (3 f + x) Sin[\[Theta]], x, Reals][[1]]; b = a*Sin[\[...


1

There's no need for all this dynamic stuff, you can use Solve[] in conjunction with Manipulate[], and let Manipulate[] handle the dynamic stuff. Manipulate[ h = x /. Quiet@ Solve[2 == x*Cos[θ] - (p*x^2)/(6*c*d) (3 f + x) Sin[θ], x, Reals][[1]]; Show[{Graphics[{Opacity[0.5], Red, Rectangle[{1, 0}, {2, 1}]}, PlotRange -> {{-1, 2},...


1

Referring to the Manipulate documentation, you can change your sliders to input fields by going from control {x,0,10} to {x,0}. B = 2; Manipulate[ Show[{Graphics[{Opacity[0.5], Red, Rectangle[{1, 0}, {2, 1}]}, PlotRange -> {{-1, 2}, {-3, 3}}, Axes -> True, AxesOrigin -> {0, 0}], ParametricPlot[{x* Cos[\[Theta]] - (P*x^2)/(6*C*...



Top 50 recent answers are included