1
我寫方程鏈/從IPython的筆記本傳熱問題的任務(我是新來的那一個),像這樣:在IPython筆記本中顯示任務結果?
# nominal diameter
d=3.55 # m
# ambient temperature
T0=15 # C
# surface temperature
Tw=300 # C
# average film temperature
Tm=(T0+Tw)/2+273.15 # K!
# expansion coefficient, $$\beta=1/T$$ for ideal gas
beta=1./Tm
# temperature difference
dT=Tw-T0 # C or K
有沒有辦法相互呼應分配,讓那些(主要是計算)值顯示?我知道%whos
魔術,但它按字母順序顯示變量。
理想情況下,我想獲得這樣的事:
# nominal diameter
d=3.55 # m
3.55
# ambient temperature
T0=15 # C
15
# surface temperature
Tw=300 # C
300
# average film temperature
Tm=(T0+Tw)/2+273.15 # K!
430.15
# expansion coefficient, $$\beta=1/T$$ for ideal gas
beta=1./Tm
0.00232477042892
# temperature difference
dT=Tw-T0 # C or K
285
與輸入/輸出promps(我不介意)和語法高亮
可能。
用IPython以這種方式記錄計算的正確方法是什麼?
可能重複[ipython:自動迴應賦值語句的結果?](http://stackoverflow.com/questions/4273695/ipython-automatically-echo-result-of-assignment-statement) – nluigi