Hot answers tagged

4

Responding to the OP's comment, here is a way to monitor subkernel progress. (* Clear variables *) ToExpression["x" <> ToString[#], StandardForm, Clear] & /@ ParallelEvaluate[$KernelID, Kernels[]]; (* Monitor *) With[{varnames = "x" <> ToString[#] & /@ ParallelEvaluate[$KernelID, Kernels[]]}, With[{vars = ToExpression@varnames}, ...


3

Use the second argument to Dynamic. Example: DynamicModule[{NumSelec = {}}, Column[{ CheckboxBar[ Dynamic[NumSelec, (If[Length[#] > 2, NumSelec = #[[-2 ;;]], NumSelec = #]) &], {1, 2, 3, 4}], Dynamic[NumSelec] }] ]


1

Here's a way using a function to rewrite the dynamic value when length of 2 is exceeded. Manipulate[ NumSelec = limit[NumSelec, 2], {NumSelec, {1, 2, 3, 4}, ControlType -> CheckboxBar}, Initialization :> ( limit[x_, num_] := If[ListQ[x], If[Length[x] > num, x[[-num ;;]], x], x]) ]


1

This is one way using DynamicModule DynamicModule[{NumSelec1 = {}, NumSelec2 = {}, NumSelec3 = {}, false}, Column[{ Dynamic@ Row[{CheckboxBar[Dynamic[NumSelec1], {1}, Enabled -> (NumSelec1 =!= {} || false)], CheckboxBar[Dynamic[NumSelec2], {2}, Enabled -> (NumSelec2 =!= {} || false)], ...


1

Changing initial conditions can be accomplished in the same way that parameters are changed. For instance, replace Yb[0] == 0.1 by Yb[0] == Yb0, add the corresponding control, {{Yb0, 0.1}, 0, 1, Appearance -> "Labeled"}, and include Yb0 in the list of TrackedSymbols.



Only top voted, non community-wiki answers of a minimum length are eligible