4
$\begingroup$

Sorry for possible duplicate. Is it possible to bind dynamically to variables of Manipulate, so if I change one variable the second one changes synchronously in the following example

Manipulate[
 {a, b, c},
 {a, 0, 10},
 {b, 0, 10},
 {c, 0, 10},
 {{equalab, false, "a=b"}, { true, false}},
 {{equalbc, false, "c=b"}, { true, false}},
 {{equalac, false, "a=c"}, { true, false}}
]
$\endgroup$
4
$\begingroup$
Manipulate[If[equalab, b = a]; If[equalbc, c = b]; If[equalac, c = a]; {a, b, c}, 
 {a, 0, 10}, {b, 0, 10}, {c, 0,  10}, 
 {{equalab, False, "a=b"}, {True, False}}, 
 {{equalbc, False, "c=b"}, {True, False}}, 
 {{equalac, False, "a=c"}, {True, False}}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.