CoCalc Public Filessupport / 2016-05-29-interact.sagewsOpen in with one click!
Author: William A. Stein
Description: Jupyter notebook support/2015-06-04-141749-bokeh.ipynb

Given the relationship between V and P is V=P+107, and two input_box are defined.

def _(P=input_box(20, width=6, label="power(dBm)"),V=input_box(127, width=6, label="voltage(dBuV)")):

want to know is it possible to realize when I input the new number to the input_box of P, the input_box of V will dynamically update the value base on the relationship of V=P+107. and the vice versa.

@interact def f(P=input_box(20, width=15, label="power(dBm)"),V=input_box(127, width=15, label="voltage(dBuV)")): print "before update, V = ", V f.V = P+107
Interact: please open in CoCalc